Changelogs
| version | time | content |
|---|---|---|
| V1.0.0 | 2024-03-01 |
initial version |
Introduction
Communication Protocol
HTTPS Protocol.
Encoding
The request and response data code for all interfaces is formatted according to UTF-8. Content for responses in all interfaces is formatted according to JSON.
API Request Structure
| Name | Description | Notes |
|---|---|---|
| API Address | Address for API interface | Eg. https://mapi.matrixport.com/dcp/api/v1/index_price??base=BTC"e=USDT |
| Public Parameters | Universal parameters for all interfaces | |
| Private Parameter | Special parameters for each interface | See each API interface description for details |
API hosts (production)
- REST API:
https://mapi.matrixport.com
API hosts (beta)
- REST API:
https://pre-mapi.matrixport.vip
Public Parameters
Public parameters are used for interface authentication. Unless otherwise necessary, these parameters will be omitted for each interface. Each request must contain these parameters unless stated otherwise.
| Parameter Name | Type | Mandatory | Limit | Description |
|---|---|---|---|---|
| X-MatrixPort-Access-Key | string | Y | 32 | Access-Key given to users is contained within the http header. |
| X-MatrixPort-Access-Signature | string | Y | - | Request signature is used to authorize the legitimacy of the request. Contained within the http header. |
| timestamp | int64 | Y | - | Millisecond timestamp is contained within the http query param or body. |
| language-type | int | Y | - | Language type within the interface will return according to: 0=CN, 1=EN, 2= RU |
| x-request-id | string | N | - | Globally unique trace id, used for tracing requests |
Response Format Strings
All interface response values are formatted according to JSON. Unless otherwise stated, all request return values contain the following text strings:
| Parameter Name | Type | Description |
|---|---|---|
| code | int | Interface call status, (ie. error code): 0: Normal, Others: Call error. |
| message | string | Error message is description of API errors |
| data | object | Results will return as defined by each interface |
Authentication
Structure API
Index Price
Interface Description
- Get current index price
GET
/structured/api/v1/index_priceRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| base | string | Y | Base currency, eg BTC |
| quote | string | Y | Quote currency, eg USDC |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/index_price?base=BTC"e=USDT"
{
"code": 0,
"data": {
"index_price": "20000"
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| index_price | string | Index price in string format |
User Available Balance
Interface Description
- Get user available balance
GET
/structured/api/v1/available_balanceRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| currency | string | Y | Currency |
| amount | int | N | Amount Number of Currency |
| payment_method | int | Y | Payment Method: 0:Balance, 1:Cashier |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/available_balance?currency=BTC&payment_method=1"
{
"code": 0,
"data": {
"available_balance": "100",
"payment_method": 1
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| available_balance | string | Available balance in string format |
| payment_method | int | Payment method: 0 balance, 1 cashier |
Payment Combination
Interface Description
- Get user payment combination available balance
GET
/structured/api/v1/cashier/payment_combinationRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| currency | string | Y | Currency |
| amount | int | N | Amount Number of Currency |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/cashier/payment_combination?currency=BTC"
{
"code": 0,
"data": {
"total": "100",
"pay_list": [
{
"pay_channel": "balance",
"total_available_amount": "100",
"should_sub_amount": "0"
},
{
"pay_channel": "flexi_saving",
"total_available_amount": "0",
"should_sub_amount": "0"
}
]
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| total | string | Total available balance, in string format |
| pay_list | array | Pay channel info |
| pay_list.pay_channel | string | Pay channel: balance means user balance, flexi_saving mean user balance in flexi saving |
| pay_list.total_available_amount | string | Total available amount in specific channel |
| pay_list.should_sub_amount | string | Should sub amount in specific channel |
Trading Exchanges of Strategy
Interface Details:
- Get trading exchanges of strategy
GET
/structured/api/v1/trading_exchangesRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | string | Y | Unique identifier for the strategy |
- Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/trading_exchanges?strategy_id=7185535320921071616
{
"code": 0,
"data": {
"timestamp": 1721099400000,
"exchanges": [
{
"exchanges_name": "binance",
"proportion": "0"
},
{
"exchanges_name": "bit.com",
"proportion": "1"
}
]
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| timestamp | int | Update time in millisecond |
| exchanges | array | Vendor trade exchange info |
| exchanges.exchanges_name | string | Specific exchange, eg deribit |
| exchanges.proportion | int | Exchange trade percentage in total Exchange Trade |
Product Strategy
Interface Details:
- Get available product strategy
GET
/structured/api/v1/product/strategyRequest Parameters
- Request Parameter Location: query_string
Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/product/strategy"
{
"code": 0,
"data": [
{
"strategy_id": "1",
"icon_url": "icon.png",
"name": [
{
"language": "en-US",
"name": "Seagull"
}
],
"introduction": [
{
"language": "en-US",
"name": "Buy low, sell high, and your profits will soar"
}
],
"intro_url": "",
"intro_link": [
{
"language": "en-US",
"name": "intro_link_path"
}
],
"biz_name": "seagull",
"tags": [
{
"color": "#E4FFE2",
"i18n": [
{
"language": "en-US",
"name": "New"
}
]
}
],
"types": [
{
"strategy_type": 1,
"base_currency": [
"BTC",
"ETH"
]
},
{
"strategy_type": 2,
"base_currency": [
"BTC",
"ETH"
]
}
],
"intro_pic_resp": {
"0": {
"CALL": [
{
"strategy_id": "1",
"aggregated_product_id": "11",
"language": "en-US",
"protection_type": 0,
"type": "CALL",
"name": "Bullish",
"url": "call_yield_curve.png",
"content_u": "",
"content_coin": "",
"group_id": "0"
}
],
"PUT": [
{
"strategy_id": "1",
"aggregated_product_id": "11",
"language": "en-US",
"protection_type": 0,
"type": "PUT",
"name": "Bearish",
"url": "put_yield_curve.png",
"content_u": "",
"content_coin": "",
"group_id": "0"
}
]
}
},
"guidance": null
}
],
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| strategy_id | string | Unique identifier for the strategy |
| icon_url | string | URL of strategy icons |
| name | array | Name of strategy, Return multiple languages in an array |
| name.tag_id | string | Tag ID associated with TagI18n |
| name.language | string | Language Code |
| name.name | string | Strategy name in the specified language |
| introduction | array | Introduction of strategy, Return multiple languages in an array |
| introduction.language | string | Language Code |
| introduction.name | string | Strategy introduction in the specified language |
| intro_url | string | URL associated with the strategy |
| intro_link | array | Introduction Url, Return multiple languages in an array |
| intro_link.tag_id | string | Tag ID associated with the introduction link |
| intro_link.language | string | Language Code |
| intro_link.name | string | URL link associated with the introduction |
| tags | array | Array of tags |
| tags.color | string | Color associated with the tag |
| tags.i18n.language | string | Language Code |
| tags.i18n.name | string | Name of the tag in Product |
| types | array | Array of types |
| types.strategy_type | int | Type of strategy(bullish, bearish) |
| types.base_currency | array | Array containing base currencies associated with the strategy |
| intro_pic_resp | object | map[key,map[key,[]array]],1st key: 0 unkonwn,1 protected,2 unprotected; 2st key: DirectionType,CALL or PUT; Return multiple languages in an array |
| guidance | array | Guidance of items, Return multiple languages in an array |
| guidance.item_i18n.language | string | Language Code |
| guidance.item_i18n.content | string | content associated with the guidance item |
Product Homepagelist
Interface Details:
- Get Homepage Product List
GET
/structured/api/v1/product/homepagelistRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | string | Y | Unique identifier for the strategy |
| type | string | Y | Type of strategy direction |
| Possible values: | |||
| - CALL: Bullish strategy | |||
| - PUT: Bearish strategy | |||
| protection_type | string | N | Type of protection for the strategy |
| base_currency | string | N | Currency filter |
| Specifies the base currency for filtering strategies | |||
| (e.g., "BTC" for BTC-USDT pairs), empty string "" for all | |||
| invest_currency | string | N | Investment currency filter |
| Specifies the investment currency for filtering strategies | |||
| (e.g., "BTC" or "USDT" for BTC-USDT pairs), empty string "" for all |
- Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/product/homepagelist?base_currency=BTC&strategy_id=1&type=CALL"
{
"code": 0,
"data": [
{
"strategy_id": "1",
"items": [
{
"name": [
{
"language": "en-US",
"name": "Seagull bullish BTC-USDT"
}
],
"aggregated_product_id": "11",
"invest_currency": "USDT",
"underlying": "BTC-USDT",
"tracking_source": "DERIBIT",
"type": "CALL",
"term_mill": "1728547200000",
"min_buy_per_order": "100",
"max_buy_per_order": "98400",
"buy_step": "0.00000001",
"max_order_number_per_user": null,
"max_buy_per_user": null,
"max_buy_product": "98400",
"meta_id": "11",
"vendor_id": "10006",
"base_currency": "BTC",
"quote_currency": "USDT",
"is_fixed_maturity": true,
"tenor": "0.9",
"is_redeemable": false,
"request_time": 1728467131561,
"is_percentage_price": false,
"yield_data_type": 3,
"display_ref_apy_type": 2,
"ref_apy": "1.58% ~ 266.40%",
"display_price_type": 4,
"display_price": null,
"profit_spread_apy": "0.14",
"done_profit_spread": true,
"strike_price": "61500",
"apy": "0",
"take_profit_price": "63500",
"protection_price": "63000",
"take_profit_apy": "2.6640395",
"protection_apy": "0.015887",
"zero_price_apy": "0.015887",
"low_price_apy": "0.015887",
"high_price_apy": "2.6640395",
"max_user_apy": "2.6640395",
"min_user_apy": "0.015887",
"expiry_date": 1728547200000
}
]
}
],
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| strategy_id | string | Unique identifier for the strategy |
| items | array | Array containing multiple AggregatedProductItemWithStrategy objects |
| items.name | array | Name of product |
| items.name.language | string | Language Code |
| items.name.name | string | Name of product in specific language |
| items.aggregated_product_id | string | Id of aggregated product |
| items.invest_currency | string | Currency used for investment |
| items.underlying | string | Underlying asset of the product |
| items.tracking_source | string | Source of tracking information for the product |
| items.type | string | Type of the product |
| items.term_mill | string | Term of the product in milliseconds |
| items.min_buy_per_order | string | Minimum purchase amount per order |
| items.max_buy_per_order | string | Maximum purchase amount per order |
| items.buy_step | string | Purchase step size |
| items.max_order_number_per_user | string | Maximum number of orders per user |
| items.max_buy_per_user | string | Maximum purchase amount per user |
| items.max_buy_product | string | Maximum purchase limit for the product |
| items.meta_id | string | Metadata ID of the product |
| items.vendor_id | string | Vendor ID of the product |
| items.base_currency | string | Base currency used for the product |
| items.quote_currency | string | Quote currency used for the product |
| items.is_fixed_maturity | bool | Indicates if the product has a fixed maturity |
| items.tenor | string | Tenor or duration of the product |
| items.is_redeemable | bool | Indicates if the product is redeemable |
| items.request_time | string | Time when the request was made |
| items.is_percentage_price | bool | Indicates if the price is percentage-based |
| items.yield_data_type | int | Type of yield data |
| items.display_ref_apy_type | int | Type of displayed reference APY |
| items.ref_apy | string | Reference APY value |
| items.display_price_type | int | Type of displayed price |
| items.display_price.tag_id | string | Tag ID |
| items.display_price.language | string | Languamax_buy_per_usermax_buy_per_userge Code |
| items.display_price.name | string | Name of the product |
| items.profit_spread_apy | string | Profit spread APY |
| items.done_profit_spread | bool | Indicates if profit spread is completed |
| items.strike_price | string | Strike price of the product |
| items.apy | string | APY (Annual Percentage Yield) of the product |
| items.take_profit_price | string | Take profit price range |
| items.protection_price | string | Protection price range |
| items.take_profit_apy | string | APY for take profit range |
| items.protection_apy | string | APY for protection range |
| items.zero_price_apy | string | APY for zero price range |
| items.low_price_apy | string | APY for low price range |
| items.high_price_apy | string | APY for high price range |
| items.max_user_apy | string | Maximum APY for users |
| items.min_user_apy | string | Minimum APY for users |
| items.expiry_date | string | Expiry date of the product |
Product Currency List
Interface Details:
- Get Product Currency List
GET
/structured/api/v1/product/currency_listRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | int | Y | Unique identifier for the strategy |
| protection_type | int | Y | Protection type, 1: Protected 2:Unprotected |
| type | string | Y | Type of protection for the strategy, CALL=Bullish, PUT=Bearish |
- Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
- Data Structure & Description:
curl 'https://mapi.matrixport.com/structured/api/v1/product/currency_list?protection_type=0&strategy_id=1&type=CALL'
{
"code": 0,
"data": [
{
"base_currency": "BTC",
"tags": null,
"min_annualized_yield": "0.0090",
"max_annualized_yield": "2.5090",
"protection_type": 0,
"products": [
{
"type": "CALL",
"name": [
{
"language": "en-US",
"name": "Smart_Trend bullish BTC"
}
],
"base_currency": "BTC",
"invest_currency": "BTC",
"underlying": "BTC-USDT",
"mini_annualized_yield": "0.0090",
"max_annualized_yield": "2.5090",
"convertible": false
}
]
}
],
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| base_currency | string | The base currency used, eg BTC, ETH |
| min_annualized_yield | string | The minimum annualized yield across all products. |
| max_annualized_yield | string | The maximum annualized yield across all products. |
| protection_type | int | The type of protection (NoProtectionType, Protection, Unprotected). |
| products | array | List of currency items available. |
| products.type | string | Product CALL or PUT |
| products.name | array | Product name details, Return multiple languages in an array |
| products.base_currency | string | Base currency |
| products.invest_currency | string | Currency used for investment |
| products.underlying | string | Underlying asset |
| products.mini_annualized_yield | string | Minimum annualized yield |
| Products.max_annualized_yield | string | Maximum annualized yield |
| products.convertible | bool | Indicates if the product is convertible |
Product List
Interface Details:
- Get product list
GET
/structured/api/v1/product/listRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | string | Y | The ID of the strategy (string format). |
| type | string | Y | Type of strategy (CALL for Bullish, PUT for Bearish, "" for no direction attribute). |
| protection_type | int | Y | Type of protection (0:NoProtectionType, 1:Protection, 2:Unprotected). |
| base_currency | string | Y | Filter by base currency (e.g., "BTC" for BTC-USDT). Leave empty ("") for all currencies. |
| invest_currency | string | Y | Filter by investment currency (e.g., "BTC" or "USDT" for BTC-USDT). Leave empty ("") for all currencies. |
- Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/product/list?strategy_id=3&base_currency=BTC&invest_currency=BTC&type=CALL&protection_type=0"
{
"code": 0,
"data": {
"strategy_id": "3",
"icon_url": "https://matrixport-public.s3.ap-southeast-1.amazonaws.com/dbacbdd7-f8b1-4a75-9580-ffb927983207.png",
"name": [
{
"language": "en-US",
"name": "Snowball"
}
],
"introduction": [
{
"language": "zh-CN",
"name": "snowball-into-cn"
}
],
"intro_url": "",
"intro_link": [
{
"language": "en-US",
"name": "link.url"
}
],
"intro_pic": [
{
"strategy_id": "3",
"aggregated_product_id": "5",
"language": "en-US",
"protection_type": 0,
"type": "CALL",
"name": "1",
"url": "https://rd2-images.matrixtechfin.com/808c32f3-93ff-4b00-8ed1-58ba44798129.png",
"content_u": "1",
"content_coin": "",
"group_id": "0"
}
],
"aggregated_products": [
{
"name": [
{
"language": "en-US",
"name": "Snowball bullish BTC"
}
],
"is_redeemable": false,
"tags": [],
"expiry_date": 1721376000000,
"tenor": "1",
"products": [
{
"name": null,
"tags": [],
"aggregated_product_id": "3",
"invest_currency": "BTC",
"underlying": "BTC-USDT",
"tracking_source": "DERIBIT",
"type": "CALL",
"term_mill": "86400000",
"min_buy_per_order": "0.000159",
"max_buy_per_order": "0.0152995217981467",
"buy_step": "0.00000001",
"max_order_number_per_user": null,
"max_buy_per_user": null,
"max_buy_product": "0.0152995217981467",
"meta_id": "3",
"vendor_id": "77",
"base_currency": "BTC",
"quote_currency": "USDT",
"is_fixed_maturity": false,
"tenor": "1",
"is_redeemable": false,
"request_time": 1721222880606,
"is_percentage_price": true,
"yield_data_type": 2,
"display_ref_apy_type": 1,
"ref_apy": "147.22%",
"display_price_type": 1,
"display_price": null,
"profit_spread_apy": "0",
"done_profit_spread": true,
"strike_price": "0",
"apy": "0",
"take_profit_price": "1.03",
"protection_price": "0.98",
"take_profit_apy": "1.47218934472430456",
"protection_apy": "1.47218934472430456",
"zero_price_apy": "1.47218934472430456",
"low_price_apy": "1.47218934472430456",
"high_price_apy": "1.47218934472430456",
"max_user_apy": "1.47218934472430456",
"min_user_apy": "1.47218934472430456",
"expiry_date": 1721376000000
}
]
}
],
"guidance": [
{
"item_i18n": [
{
"language": "en-US",
"content": "png.url"
}
]
}
]
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| strategy_id | string | The unique identifier of the strategy |
| icon_url | string | Strategy icon url |
| name | array | Name of product |
| introduction | array | Introduction of Product |
| intro_url | string | URL related to the introduction |
| intro_link | array | URL link related to the product |
| intro_pic | array | Array of pictures used for introducing the product |
| aggregated_products | array | Array of aggregated products associated with the product |
| aggregated_products.name | array | Name of Product |
| aggregated_products.is_redeemable | bool | Indicates if the product is redeemable |
| aggregated_products.expiry_date | int | Expiry date for certain products |
| aggregated_products.tenor | string | Tenor of the product for H5 display |
| aggregated_products.products | array | List of aggregated product items |
| aggregated_products.products.name | string | Product name |
| aggregated_products.products.tags | string | Product tags |
| aggregated_products.products.aggregated_product_id | string | Product aggregated product id |
| aggregated_products.products.invest_currency | string | Currency used for investment |
| aggregated_products.products.underlying | string | Underlying pair |
| aggregated_products.products.tracking_source | string | Source of tracking |
| aggregated_products.products.type | string | Type of the product |
| aggregated_products.products.term_mill | int | Term in milliseconds |
| aggregated_products.products.min_buy_per_order | string | Minimum buy amount per order |
| aggregated_products.products.max_buy_per_order | string | Maximum buy amount per order |
| aggregated_products.products.buy_step | string | Step for buying |
| aggregated_products.products.max_order_number_per_user | string | Maximum order number per user |
| aggregated_products.products.max_buy_per_user | string | Maximum buy amount per user |
| aggregated_products.products.max_buy_product | string | Maximum buy product amount |
| aggregated_products.products.meta_id | int | Meta ID of the product |
| aggregated_products.products.vendor_id | int | Vendor ID associated with the product |
| aggregated_products.products.base_currency | string | Base currency |
| aggregated_products.products.quote_currency | string | Quote currency |
| aggregated_products.products.is_fixed_maturity | bool | Indicates if product has fixed maturity |
| aggregated_products.products.is_redeemable | bool | Indicates if the product is redeemable |
| aggregated_products.products.request_time | int | Time of request |
| aggregated_products.products.is_percentage_price | bool | Indicates if price is percentage-based |
| aggregated_products.products.yield_data_type | string | Type of yield data (1 for value, 2 for points) |
| aggregated_products.products.display_ref_apy_type | int | Type of display for reference APY |
| aggregated_products.products.ref_apy | string | Reference APY |
| aggregated_products.products.display_price_type | int | Type of display price (1 for protection price, 2 for strike price) |
| aggregated_products.products.profit_spread_apy | string | Profit spread APY |
| aggregated_products.products.done_profit_spread | bool | Indicates if profit spread is done |
| aggregated_products.products.strike_price | string | Strike price |
| aggregated_products.products.apy | string | Annual percentage yield (APY) |
| aggregated_products.products.take_profit_price | string | Take profit price |
| aggregated_products.products.protection_price | string | Protection price |
| aggregated_products.products.takeProfit_apy | string | Take profit APY |
| aggregated_products.products.protection_apy | string | Protection APY |
| aggregated_products.products.zero_price_apy | string | Zero price APY |
| aggregated_products.products.low_price_apy | string | Low price APY |
| aggregated_products.products.high_price_apy | string | High price APY [highPrice, inf) |
| aggregated_products.products.max_user_apy | string | Maximum user APY |
| aggregated_products.products.min_user_apy | string | Minimum user APY |
| aggregated_products.products.expiry_date | int | Expiry date |
| guidance | array | Array Guidance of the product |
Product Detail
Interface Details:
- Get Product details
GET
/structured/api/v1/product/detailRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | int | Y | The ID of the strategy |
| aggregated_product_id | int | Y | The aggregated product ID |
| type | string | Y | Type of strategy (CALL for Bullish, PUT for Bearish). |
| invest_currency | string | Y | Currency for investment. |
| underlying | string | Y | Underlying asset pair. |
| strike_price | int | Y | Strike price of the asset. |
| take_profit_price | int | Y | Take profit price. |
| protection_price | int | Y | Protection price. |
| term_mill | int | Y | Term in milliseconds (string format). |
| tracking_source | string | Y | Settlement index data source. |
| invest_amount | int | Y | Amount invested. Set to 0 if not specified. |
| is_init_call | bool | Y | Indicates if it's the initial call to the detail page. |
| coupon_apy_e8 | int | Y | Coupon annual percentage yield (E8 format). |
- Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/product/detail?protection_price=0.99&take_profit_price=1.01&strike_price=0&aggregated_product_id=3&strategy_id=3&invest_currency=USDT&term_mill=86400000&tracking_source=DERIBIT&type=CALL&underlying=BTC-USDT&invest_amount=10&is_init_call=false&coupon_apy_e8=0"
{
"code": 0,
"data": [
{
"invest_currency": "USDT",
"underlying": "BTC-USDT",
"tracking_source": "DERIBIT",
"type": "CALL",
"term_mill": "86400000",
"min_buy_per_order": "10",
"max_buy_per_order": "1000",
"buy_step": "0.00000001",
"max_order_number_per_user": null,
"max_buy_per_user": null,
"max_buy_product": "1000",
"meta_id": "3",
"vendor_id": "77",
"base_currency": "BTC",
"quote_currency": "USDT",
"is_fixed_maturity": false,
"tenor": "1",
"is_redeemable": false,
"request_time": 1721223571405,
"is_percentage_price": true,
"yield_data_type": 2,
"display_ref_apy_type": 1,
"ref_apy": "347.47%",
"display_price_type": 1,
"display_price": null,
"profit_spread_apy": "0",
"done_profit_spread": true,
"strike_price": "0",
"apy": "0",
"take_profit_price": "1.01",
"protection_price": "0.99",
"take_profit_apy": "3.4746769306826016",
"protection_apy": "3.4746769306826016",
"zero_price_apy": "3.4746769306826016",
"low_price_apy": "3.4746769306826016",
"high_price_apy": "3.4746769306826016",
"max_user_apy": "3.4746769306826016",
"min_user_apy": "3.4746769306826016",
"expiry_date": 0,
"protection_type": 0,
"name": [
{
"language": "en-US",
"name": "Snowball bullish BTC-USDT"
}
],
"global_min_buy_per_order": "10",
"global_max_buy_per_order": "1000",
"global_buy_step": "0.00000001",
"tags": null,
"intro_pic": [
{
"owner_id": "3",
"item_id": "0",
"language": "en-US",
"type": "CALL",
"name": "price protection",
"url": "pic.url",
"content_u": "The order will be settled early and you will receive the partial principal ({baseCurrency}) + interest ({baseCurrency}) on the knock-in date.\u003cbr/\u003e\nPartial Principal ({baseCurrency}) = Principal ({investCurrency}) * Observation Price on Day of Knock-In / Initial Price\u003cbr/\u003e\nProfit ({baseCurrency}) = Principal * Holding Period * Reference APR / 365",
"content_coin": "The order will be settled early and you will receive the partial principal ({baseCurrency}) + interest ({baseCurrency}) on the knock-in date.\u003cbr/\u003e\nPartial Principal ({baseCurrency}) = Principal ({investCurrency}) * Observation Price on Day of Knock-In / Initial Price\u003cbr/\u003e\nProfit ({baseCurrency}) = Principal * Holding Period * Reference APR / 365",
"group_id": "0"
}
],
"payoff_enabled": true,
"settle_condition": [
{
"price_condition": "",
"price_condition_i18n": [
{
"language": "en-US",
"name": "\u003e= BTC Price*101.00%"
}
],
"action_i18n": [
{
"language": "en-US",
"name": "Early Settlement"
}
],
"apy": "347.47%",
"amount": "",
"currency": "USDT"
},
{
"price_condition": "",
"price_condition_i18n": [
{
"language": "en-US",
"name": "BTC Price*99.00% ~ BTC Price*101.00%"
}
],
"action_i18n": [
{
"language": "en-US",
"name": "Due Settlement"
}
],
"apy": "347.47%",
"amount": "10.09",
"currency": "USDT"
},
{
"price_condition": "",
"price_condition_i18n": [
{
"language": "en-US",
"name": "\u003c= BTC Price*99.00%"
}
],
"action_i18n": [
{
"language": "en-US",
"name": "Early Settlement"
}
],
"apy": "347.47%",
"amount": "",
"currency": "BTC"
}
],
"settle_glossary": null,
"intro_url": "",
"intro_link": [
{
"language": "en-US",
"name": "intro link.url"
}
],
"purchase_time": 1721223593605,
"value_time_mill": 1721289600000,
"maturity_time": 1721376000000,
"settlement_time": 1721390400000,
"exchange_info": "",
"faq": [],
"biz_name": "snowball_standard",
"apy_points": [
{
"price": "0.99",
"apy": "3.4746769306826016"
},
{
"price": "1.01",
"apy": "3.4746769306826016"
}
],
"share_price": "",
"observe_type": 1,
"convertible": true
}
],
"message": ""
}
| Field Name | Type | Description |
|---|---|---|
| invest_currency | string | Currency used for investment. |
| underlying | string | Underlying asset of the product. |
| tracking_source | string | Source of tracking information. |
| type | int | Direction type of the product (custom type from core package). |
| term_mill | string | Term in milliseconds, represented as a string. |
| min_buy_per_order | string | Minimum buy amount per order. |
| max_buy_per_order | string | Maximum buy amount per order. |
| buy_step | string | Incremental step for buying. |
| max_order_number_per_user | string | Maximum number of orders per user. |
| max_buy_per_user | string | Maximum buy amount per user. |
| max_buy_product | string | Maximum buy amount for the product. |
| meta_id | string | Meta ID of the product, represented as a string. |
| vendor_id | string | Vendor ID of the product, represented as a string. |
| base_currency | string | Base currency used in pricing. |
| quote_currency | string | Quote currency used in pricing. |
| is_fixed_maturity | bool | Indicates if the product has a fixed maturity. |
| tenor | string | Tenor of the product. |
| is_redeemable | bool | Indicates if the product is redeemable. |
| request_time | int | Timestamp of request creation. |
| is_percentage_price | bool | Indicates if the price is represented as a percentage. |
| yield_data_type | int | Type of yield data (custom type from core package). |
| display_ref_apy_type | int | Type of displayed reference APY (custom type from core package). |
| ref_apy | string | Reference APY value. |
| display_price_type | int | Type of displayed price (custom type from core package). |
| profit_spread_apy | string | APY spread for profit calculations. |
| done_profit_spread | bool | Indicates if profit spread calculation is done. |
| strike_price | string | Strike price of the product. |
| apy | string | Annual percentage yield (APY) of the product. |
| take_profit_price | string | Price range for take profit (exclusive). |
| protection_price | string | Protection price of the product. |
| take_profit_apy | string | APY for take profit range. |
| protection_apy | string | APY for protection range. |
| zero_price_apy | string | APY for zero price range (inclusive). |
| low_price_apy | string | APY for low price range. |
| high_price_apy | string | APY for high price range. |
| max_user_apy | string | Maximum APY for users (used in sorting). |
| min_user_apy | string | Minimum APY for users (used in sorting). |
| expiry_date | int | Expiry date of the product. |
Get Product Agreement
Interface Description
- Get product agreement
GET
/structured/api/v1/product/agreementRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| biz | string | Y | business code |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/product/agreement?biz=dcp"
{
"code": 0,
"data": "agreement content",
"message": ""
}
Place Order
Interface Details:
- Place order
POST
/structured/api/v1/orderRequest Parameters
- Request Parameter Location: body/json
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | string | Y | ID of the strategy |
| aggregated_product_id | string | Y | ID of the AggregatedProduct |
| meta_id | string | Y | Meta ID |
| currency | string | Y | Currency used for investment |
| amount | string | Y | Investment amount |
| quote_id | string | Y | Inquiry ID |
| coupon_id | string | N | Coupon ID |
| need_auto_renew | bool | N | Whether automatic renewal is needed |
- Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
- Data Structure & Description:
curl -X 'POST' \
'https://mapi.matrixport.com/structured/api/v1/order' \
-H 'accept: application/json' \
-H 'USER-ID: 1234' \
-H 'Content-Type: application/json' \
-d '{
"currency": "USDT",
"meta_id": "3",
"quote_id": "581393718",
"aggregated_product_id": "3",
"strategy_id": "3",
"amount": "10",
}'
{
"code": 0,
"data": {
"order_id": "7219335976999837697"
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| order_id | string | OrderID |
Get Order Result
Interface Details:
- Get order result
GET
/structured/api/v1/order/resultRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| order_id | string | Y | OrderID |
- Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/order/result?order_id=7125051716340613120"
{
"code": 0,
"data": {
"strategy_id": "3",
"product_name": [
{
"language": "en-US",
"name": "Snowball bearish BTC-USDT"
}
],
"maturity_time": "1709107200000",
"display_price_type": 3,
"base_currency": "BTC",
"is_percentage_price": false,
"strike_price": "56000",
"take_profit_price": "0",
"protection_price": "0",
"ref_apy": "271.50%",
"coupon_apy": "0",
"invest_amount": "222",
"invest_currency": "USDT",
"status": 1,
"failed_code": 0,
"failed_message": "",
"aggregated_product_id": "4",
"meta_id": "4",
"type": "PUT",
"need_auto_renew": false,
"renew_tenor": "0",
"renew_coupon_id": "",
"renew_coupon_apy": "0",
"renew_strike_price": "0",
"renew_take_profit_price": "0",
"renew_protection_price": "0",
"renew_change_flag": 1,
"renew_change_hour_ahead": 0
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| strategy_id | string | ID of the strategy |
| product_name | array | Product name, Return multiple languages in an array |
| maturity_time | int | Maturity time |
| display_price_type | int | Display price type (1=protection_price and take_profit_price; 2=price range; 3=strike_price) |
| base_currency | string | Base currency |
| is_percentage_price | bool | Indicates if the price is in percentage |
| strike_price | string | Strike price |
| take_profit_price | string | Take profit price |
| protection_price | string | Protection price |
| ref_apy | string | Reference APY |
| coupon_apy | string | Coupon APY |
| invest_amount | string | Investment amount |
| invest_currency | string | Investment currency |
| status | int | Status (0=processing, 1=success, 2=failed) |
| failed_code | int | Failure code |
| failed_message | string | Error message |
| aggregated_product_id | string | ID of the AggregatedProduct |
| meta_id | string | Meta ID |
| type | string | Type(PUT, CALL) |
| need_auto_renew | bool | Indicates if automatic renewal is needed |
| renew_tenor | string | Renewal tenor (days) |
| renew_coupon_id | string | Renewal coupon ID |
| renew_coupon_apy | string | Renewal coupon APY |
| renew_strike_price | string | Renewal strike price |
| renew_take_profit_price | string | Renewal take profit price |
| renew_protection_price | string | Renewal protection price |
| renew_change_flag | int | Information flow continuous investment status; 1=disallow to change renewal information, 2=allow to change renewal information |
| renew_change_hour_ahead | int | hours ahead of MaturityTime allowing to change renew params |
Get Coupon
Interface Details:
- Get coupon info
GET
/structured/api/v1/order/couponsRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | string | Y | ID of the strategy |
| aggregated_product_id | string | Y | ID of the AggregatedProduct |
| meta_id | string | Y | Meta ID |
| type | int | Y | Type |
| currency | string | Y | Currency |
| term_mill | int | Y | Term in milliseconds |
| amount | string | N | Investment amount |
| renew_tenor | string | N | Renewal tenor (days) |
- Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/order/coupons?aggregated_product_id=11&strategy_id=7234551236144414720&term_mill=1729238400000&type=CALL¤cy=USDT"
{
"code": 0,
"data": {
"coupons": [
{
"id": "7114966916053352448",
"available": true,
"expiration_time": 1727876302773,
"year_rate": 300000,
"min_amount": 100000000,
"max_amount": 10000000000000,
"online": 1728531620000,
"deadline": 1729785600000,
"template_names": [
{
"item": "TemplateName",
"language": "En-US",
"data": "dcp111111",
"trigger": ""
}
],
"active_additional_info": [
{
"item": "ActiveAdditionalInfo_0",
"language": "en",
"data": "11",
"trigger": ""
}
],
"status": 0,
"currency": [
"USDT",
"ETH",
"BTC",
"USDC"
],
"currency_result": true,
"amount_result": true,
"product_tenor_check_result": true,
"order_type_result": true,
"coupon_period_result": true,
"currency_level": 0,
"not_available_result_level": 0,
"vip_promotion": false
}
]
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| coupons | array | Coupons array |
| coupons.id | string | CouponID |
| coupons.available | bool | available |
| coupons.year_rate | string | Yield rate in string format |
| coupons.min_amount | int | Min usable amount |
| coupons.max_amount | int | Max usable amount |
| coupons.template_names | array | Templates info |
| coupons.template_names.item | string | Coupon template item |
| coupons.template_names.language | string | Language Code |
| coupons.template_names.data | string | Coupon template data |
| coupons.template_names.trigger | string | Coupon template trigger |
| coupons.active_additional_info | array | Active additional info(same as template_names) |
| coupons.online | string | Online time in millisecond |
| coupons.deadline | string | Deadline time in millisecond |
| coupons.status | string | Coupon status: 0 unused, 1 expired, 2 used 3 locked |
| coupons.currency | array | Support currencies by this coupon |
| coupons.currency_result | bool | Currency validation result |
| coupons.currency_result.amount_result | bool | Amount validation result |
| coupons.currency_result.product_tenor_check_result | bool | Product tenor validation result |
| coupons.currency_result.order_type_result | bool | Order type validation result |
| coupons.currency_result.coupon_period_result | bool | Coupon period validation result |
| coupons.currency_result.currency_level | int | Currency level (use for sort) |
| coupons.currency_result.not_available_result_level | int | Coupon not available reason |
| coupons.currency_result.vip_promotion | bool | Is vip promotion |
Place Order Quote
Interface Description
- Get place order quote.
GET
/structured/api/v1/quoteRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| aggregated_product_id | string | Y | ID of the AggregatedProduct |
| vendor_id | string | Y | Vendor ID |
| meta_id | string | Y | Meta info ID |
| invest_currency | string | Y | Investment currency |
| underlying | string | Y | Currency pair (e.g., BTC-USDT) |
| tracking_source | string | Y | Settlement index price data source |
| type | string | Y | Type of option (CALL=Bullish, PUT=Bearish, ""=no direction attribute) |
| term_mill | string | Y | Product term in milliseconds |
| strike_price | string | Y | Strike price (individual price) |
| take_profit_price | string | Y | Take profit price |
| protection_price | string | Y | Protection price |
| invest_amount | string | Y | Investment amount |
| coupon_apy_e8 | int | Y | Coupon annual percentage yield (multiplied by 10^8) |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/quote?aggregated_product_id=3&invest_amount=10&invest_currency=USDT&meta_id=3&protection_price=0.99&strike_price=0&take_profit_price=1.01&term_mill=86400000&tracking_source=DERIBIT&type=CALL&underlying=BTC-USDT&vendor_id=77&coupon_apy_e8=0"
{
"code": 0,
"data": {
"quote_id": "581393718",
"meta_name": "snowball",
"invest_currency": "USDT",
"invest_amount": "10",
"underlying": "BTC-USDT",
"base_currency": "BTC",
"tracking_source": "DERIBIT",
"type": "CALL",
"term_mill": "86400000",
"price_expire_time_mill": "1721223841000",
"instrument": "",
"meta_id": "3",
"yield_data_type": 2,
"vendor_id": "77",
"tenor": "1",
"request_time": "1721223821630",
"value_time_status": 4,
"profit_spread_apy": "0",
"extract_premium_amount": "0",
"is_fixed_profit_spread_amount": false,
"done_profit_spread": true,
"display_price_type": 1,
"display_price": null,
"is_percentage_price": true,
"ref_apy": "347.47%",
"strike_price": "0",
"premium_amount": "0",
"take_profit_price": "1.01",
"protection_price": "0.99",
"zero_price_apy": "3.4746769306826016",
"low_price_apy": "3.4746769306826016",
"high_price_apy": "3.4746769306826016",
"apy_points": [
{
"price": "0.99",
"apy": "3.4746769306826016"
},
{
"price": "1.01",
"apy": "3.4746769306826016"
}
],
"vendor_name": "",
"quote_result": "",
"maturity_time": 1721376000000,
"coupon_apy": "0"
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| quote_id | string | Quote ID |
| meta_name | string | Meta name |
| invest_currency | string | Investment currency |
| invest_amount | string | Investment amount |
| underlying | string | Underlying asset |
| base_currency | string | Base currency |
| tracking_source | string | Tracking source for settlement |
| type | string | Type of quote (CALL or PUT) |
| term_mill | string | Term in milliseconds |
| price_expire_time_mill | string | Expiry time for price |
| instrument | string | Instrument type |
| meta_id | string | Meta ID |
| yield_data_type | int | Type of yield data |
| vendor_id | string | Vendor ID |
| tenor | string | Tenor in days |
| request_time | string | Request timestamp |
| value_time_status | int | Status of value time |
| profit_spread_apy | string | Profit spread APY |
| extract_premium_amount | string | Extracted premium amount |
| is_fixed_profit_spread_amount | bool | Flag for fixed profit spread amount |
| done_profit_spread | bool | Flag indicating if profit spread is done |
| display_price_type | int | Type of display price |
| is_percentage_price | bool | Flag indicating if price is percentage based |
| ref_apy | string | Reference APY for user |
| settle_condition | array | Settlement conditions |
| maturity_time | int | Maturity time |
| coupon_apy | string | Coupon APY |
Order List
Interface Description
- Get Order list
GET
/structured/api/v1/ordersRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| order_sort_by | int | Y | Sorting criteria for orders |
| limit | int | Y | Limit for number of results per page. Must be specified (required). |
| offset | int | N | Offset for pagination. Should be non-negative (omitempty, gte=0). |
| query_all | bool | N | Flag to query all strategies if true. |
| strategy_id | int | N | ID of the strategy (as string). |
| status_category | int | N | Status category of orders |
| find_conversion | bool | N | Flag to find converted orders |
| invest_currency | string | N | Currency for investment (all if empty) |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/orders?status_category=0&order_sort_by=4&invest_currency=&limit=10&offset=0&find_conversion=false&strategy_id="
{
"code": 0,
"data": {
"total": 2,
"items": [
{
"strategy_name": [
{
"language": "zh-CN",
"name": "雪球"
}
],
"strategy_biz_name": "snowball_standard",
"strategy_id": "3",
"aggregated_product_id": "3",
"meta_id": "3",
"observe_type": 1,
"product_name": [
{
"language": "zh-CN",
"name": "雪球 看涨 BTC-USDT"
}
],
"order_id": "7219335976999837697",
"user_id": "3078214",
"vendor_id": "77",
"term_mill": 86400000,
"is_fixed_maturity": false,
"purchase_time": 1721223825623,
"value_time_mill": 1721289600000,
"expiration_time_mill": 1721376000000,
"invest_amount": "10",
"invest_currency": "USDT",
"type": "CALL",
"protection_type": 0,
"display_price_type": 1,
"display_price": null,
"share_price": "",
"ref_apy": "347.47%",
"yield_data_type": 2,
"strike_price": "0",
"premium_amount": "0",
"is_percentage_price": true,
"take_profit_price": "1.01",
"protection_price": "0.99",
"zero_price_apy": "3.4746769306826016",
"low_price_apy": "3.4746769306826016",
"high_price_apy": "3.4746769306826016",
"apy_points": [
{
"price": "0.99",
"apy": "3.4746769306826016"
},
{
"price": "1.01",
"apy": "3.4746769306826016"
}
],
"settle_glossary": null,
"payoff_enabled": false,
"intro_pic": [],
"coupon_year_rate": 0,
"underlying": "BTC-USDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"status": 200,
"tenor": "1",
"coupon_profit": "0",
"coupon_tenor": "0",
"converted": false,
"convertible": true,
"settled_amount": "0",
"settled_currency": "",
"settlement_time": 1721390400000,
"settlement_price": "0",
"settlement_apy": "0",
"profit": "0",
"redemption_date": 0,
"maturity_time": 1721376000000,
"transaction_price": "0",
"redeemable": false,
"need_auto_renew": false,
"has_renew_to_product": false,
"renew_state": 1,
"renew_is_percentage_price": false,
"renew_tenor": "0",
"renew_coupon_id": "",
"renew_coupon_apy": "0",
"renew_strike_price": "0",
"renew_take_profit_price": "0",
"renew_protection_price": "0",
"renew_change_flag": 2,
"renew_change_hour_ahead": 0
}
]
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| total | int | Total number of items |
| items | array | List of H5 order items |
| items.strategy_name | array | Name of the strategy |
| items.strategy_biz_name | string | Strategy Business name used for querying agreement |
| items.strategy_id | string | Strategy ID |
| items.aggregated_product_id | string | ID of the AggregatedProduct |
| items.meta_id | string | Meta ID |
| items.observe_type | int | Observation type (0=expiration settlement, 1=daily observation) |
| items.product_name | array | Name of the product |
| items.order_id | int | Order ID |
| items.user_id | string | User ID |
| items.vendor_id | string | Vendor ID |
| items.term_mill | int | Term in milliseconds |
| items.is_fixed_maturity | bool | Indicates if the order has fixed maturity |
| items.purchase_time | int | Purchase time |
| items.value_time_mill | int | Value time in milliseconds |
| items.expiration_time_mill | int | Expiration time in milliseconds |
| items.invest_amount | string | Investment principal |
| items.invest_currency | string | Investment currency |
| items.type | string | Type of order (BULL, BEAR) |
| items.display_price_type | int | Type of display price |
| items.share_price | string | Display price for share page (to be deleted) |
| items.ref_apy | string | Reference APY |
| items.yield_data_type | int | Yield data type |
| items.strike_price | string | Strike price |
| items.premium_amount | int | Premium amount |
| items.is_percentage_price | bool | Indicates if the price is percentage-based |
| items.take_profit_price | string | Take profit price |
| items.protection_price | string | Protection price |
| items.zero_price_apy | string | Zero price APY |
| items.low_price_apy | string | Low price APY |
| items.high_price_apy | string | High price APY |
| items.apy_points | string | APY points |
| items.settle_condition | int | Settlement conditions |
| items.settle_glossary | int | Glossary of settlement terms |
| items.payoff_enabled | bool | Indicates if payoff graph is enabled |
| items.intro_pic | int | Introduction pictures |
| items.coupon_year_rate | int | Annualized coupon yield rate (E8) |
| items.underlying | string | Underlying asset |
| items.base_currency | string | Base currency |
| items.quote_currency | string | Quote currency |
| items.status | int | Order status (230=settled, 250=fully redeemed settlement, 500=reinvestment ongoing, other=active) |
| items.tenor | string | Tenor [value time, maturity time] |
| items.coupon_profit | int | Coupon profit, settled in SettleCurrency |
| items.coupon_tenor | string | Coupon tenor [order time, coupon usage time] |
| items.converted | bool | Indicates if converted |
| items.settled_amount | string | Actual settlement amount |
| items.settled_currency | string | Actual settlement currency |
| items.settlement_time | int | Actual settlement time |
| items.settlement_price | string | Actual settlement price (exercise is possible only when the settlement price of the call option is greater than the bar) |
| items.settlement_apy | string | Settlement APY |
| items.profit | string | Profit, including coupon (not converted) |
| items.redemption_date | int | Redemption time Unix epoch millisecond, only when redeemed |
| items.maturity_time | int | Option maturity time |
| items.transaction_price | string | Final transaction price (converted) |
| items.redeemable | bool | Indicates if redeemable |
| items.need_auto_renew | bool | Indicates if automatic reinvestment is required |
| items.has_renew_to_product | bool | Indicates whether "reinvesting to the name of the next product" is displayed |
| items.renew_state | int | Renewal state used by H5 1=processing 2=successful 3=failure |
| items.display_price_type | int | Type of display price |
| items.renew_is_percentage_price | bool | Indicates if the price is percentage-based for renewal |
| items.renew_tenor | string | Renewal tenor (days) |
| items.renew_coupon_id | string | Renewal coupon ID |
| items.renew_coupon_apy | string | Renewal coupon APY |
| items.renew_strike_price | string | Renewal strike price |
| items.renew_take_profit_price | string | Renewal take profit price |
| items.renew_protection_price | string | Renewal protection price |
| items.renew_change_flag | int | Information flow continuous investment status; 1=disallow to change renewal information, 2=allow to change renewal information |
| items.renew_change_hour_ahead | int | hours ahead of MaturityTime allowing to change renew params |
Order Detail
Interface Description
- Get order detail
GET
/structured/api/v1/order/{id}Request Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| id | int | Y | OrderID |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/order/7125082649395527680"
{
"code": 0,
"data": {
"strategy_name": [
{
"language": "en-US",
"name": "Snowball"
}
],
"strategy_biz_name": "snowball_standard",
"strategy_id": "3",
"aggregated_product_id": "3",
"meta_id": "3",
"observe_type": 1,
"product_name": [
{
"language": "en-US",
"name": "Snowball bullish BTC"
}
],
"order_id": "7219332199911645184",
"user_id": "670173",
"vendor_id": "77",
"term_mill": 86400000,
"is_fixed_maturity": false,
"purchase_time": 1721222925138,
"value_time_mill": 1721289600000,
"expiration_time_mill": 1721376000000,
"invest_amount": "0.01",
"invest_currency": "BTC",
"type": "CALL",
"protection_type": 0,
"display_price_type": 1,
"display_price": null,
"share_price": "",
"ref_apy": "147.22%",
"yield_data_type": 2,
"strike_price": "0",
"premium_amount": "0",
"is_percentage_price": true,
"take_profit_price": "1.03",
"protection_price": "0.98",
"zero_price_apy": "1.47218934472430456",
"low_price_apy": "1.47218934472430456",
"high_price_apy": "1.47218934472430456",
"apy_points": [
{
"price": "0.98",
"apy": "1.47218934472430456"
},
{
"price": "1.03",
"apy": "1.47218934472430456"
}
],
"settle_glossary": null,
"payoff_enabled": true,
"coupon_year_rate": 0,
"underlying": "BTC-USDT",
"base_currency": "BTC",
"quote_currency": "USDT",
"status": 200,
"tenor": "1",
"coupon_profit": "0",
"coupon_tenor": "0",
"converted": false,
"convertible": false,
"settled_amount": "0",
"settled_currency": "",
"settlement_time": 1721390400000,
"settlement_price": "0",
"settlement_apy": "0",
"profit": "0",
"redemption_date": 0,
"maturity_time": 1721376000000,
"transaction_price": "0",
"redeemable": false,
"need_auto_renew": true,
"has_renew_to_product": false,
"renew_state": 1,
"renew_is_percentage_price": true,
"renew_tenor": "1",
"renew_coupon_id": "",
"renew_coupon_apy": "0",
"renew_strike_price": "0",
"renew_take_profit_price": "0.03",
"renew_protection_price": "-0.02",
"renew_change_flag": 2,
"renew_change_hour_ahead": 0
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| strategy_name | array | Name of the strategy |
| strategy_biz_name | string | Strategy Business name used for querying agreement |
| strategy_id | string | Strategy ID |
| aggregated_product_id | string | ID of the AggregatedProduct |
| meta_id | string | Meta ID |
| observe_type | int | Observation type (0=expiration settlement, 1=daily observation) |
| product_name | array | Name of the product |
| order_id | int | Order ID |
| user_id | string | User ID |
| vendor_id | string | Vendor ID |
| term_mill | int | Term in milliseconds |
| is_fixed_maturity | bool | Indicates if the order has fixed maturity |
| purchase_time | int | Purchase time |
| value_time_mill | int | Value time in milliseconds |
| expiration_time_mill | int | Expiration time in milliseconds |
| invest_amount | string | Investment principal |
| invest_currency | string | Investment currency |
| type | string | Type of order (BULL, BEAR) |
| display_price_type | int | Type of display price |
| share_price | string | Display price for share page (to be deleted) |
| ref_apy | string | Reference APY |
| yield_data_type | int | Yield data type |
| strike_price | string | Strike price |
| premium_amount | int | Premium amount |
| is_percentage_price | bool | Indicates if the price is percentage-based |
| take_profit_price | string | Take profit price |
| protection_price | string | Protection price |
| zero_price_apy | string | Zero price APY |
| low_price_apy | string | Low price APY |
| high_price_apy | string | High price APY |
| apy_points | string | APY points |
| settle_condition | int | Settlement conditions |
| settle_glossary | int | Glossary of settlement terms |
| payoff_enabled | bool | Indicates if payoff graph is enabled |
| intro_pic | int | Introduction pictures |
| coupon_year_rate | int | Annualized coupon yield rate (E8) |
| underlying | string | Underlying asset |
| base_currency | string | Base currency |
| quote_currency | string | Quote currency |
| status | int | Order status (230=settled, 250=fully redeemed settlement, 500=reinvestment ongoing, other=active) |
| tenor | string | Tenor [value time, maturity time] |
| coupon_profit | int | Coupon profit, settled in SettleCurrency |
| coupon_tenor | string | Coupon tenor [order time, coupon usage time] |
| converted | bool | Indicates if converted |
| settled_amount | string | Actual settlement amount |
| settled_currency | string | Actual settlement currency |
| settlement_time | int | Actual settlement time |
| settlement_price | string | Actual settlement price (exercise is possible only when the settlement price of the call option is greater than the bar) |
| settlement_apy | string | Settlement APY |
| profit | string | Profit, including coupon (not converted) |
| redemption_date | int | Redemption time Unix epoch millisecond, only when redeemed |
| maturity_time | int | Option maturity time |
| transaction_price | string | Final transaction price (converted) |
| redeemable | bool | Indicates if redeemable |
| need_auto_renew | bool | Indicates if automatic reinvestment is required |
| has_renew_to_product | bool | Indicates whether "reinvesting to the name of the next product" is displayed |
| renew_state | int | Renewal state used by H5 1=processing 2=successful 3=failure |
| display_price_type | int | Type of display price |
| renew_is_percentage_price | bool | Indicates if the price is percentage-based for renewal |
| renew_tenor | string | Renewal tenor (days) |
| renew_coupon_id | string | Renewal coupon ID |
| renew_coupon_apy | string | Renewal coupon APY |
| renew_strike_price | string | Renewal strike price |
| renew_take_profit_price | string | Renewal take profit price |
| renew_protection_price | string | Renewal protection price |
| renew_change_flag | int | Information flow continuous investment status; 1=disallow to change renewal information, 2=allow to change renewal information |
| renew_change_hour_ahead | int | hours ahead of MaturityTime allowing to change renew params |
Switch Renew
Interface Description
- Switch renewal
POST
/structured/api/v1/switchrenewRequest Parameters
- Request Parameter Location: body/json
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| order_id | string | Y | Redeem order id |
| need_auto_renew | bool | Y | Need Renew or Not |
- Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
- Data Structure & Description:
curl -X 'POST' \
'https://mapi.matrixport.com/structured/api/v1/switchrenew' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"order_id": "7219335976999837697",
"need_auto_renew": false,
}'
{
"code": 0,
"data": {
"is_successful": true,
"need_auto_renew": true,
"order_id": "7219335976999837697",
"renew_change_flag": 0
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| is_successful | bool | Indicates if the switch operation was successful |
| order_id | string | The ID of the order |
| need_auto_renew | bool | Indicates if automatic renewal is needed for the order |
| renew_change_flag | int | Status of renewal in the information flow: |
- 1: Renewal failed in information flow |
||
- 2: Renewal successful in information flow |
Renew Tenor
Interface Description
- Get Renew tenor
GET
/structured/api/v1/renew_tenorRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| order_id | string | Y | The ID of the order |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/renew_tenor?order_id=1"
{
"code": 0,
"data": {
"tenor": [
"1"
],
"renew_change_flag": 2
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| tenor | array | List of tenor values |
| renew_change_flag | int | Status of renewal in the information flow: |
- 1: Renewal information change disallowed |
||
- 2: Renewal information change allowed |
Renew Tenor
Interface Description
- Set Renew tenor
PUT
/structured/api/v1/renew_tenorRequest Parameters
- Request Parameter Location: body/json
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| order_id | string | Y | The ID of the order |
| tenor | string | Y | The tenor value |
- Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/renew_tenor"
{
"code": 0,
"data": {
"is_successful": true,
"order_id": "",
"renew_change_flag": 0,
"tenor": "string"
},
"message": "string"
}
| Parameter Name | Type | Description |
|---|---|---|
| is_successful | bool | Indicates if the SET operation was successful |
| order_id | string | The ID of the order |
| tenor | string | The tenor value |
| renew_change_flag | int | Status of renewal in the information flow: |
- 1: Renewal information change disallowed |
||
- 2: Renewal information change allowed |
Renew Coupon
Interface Description
- Set Renew Coupon
PUT
/structured/api/v1/renew_couponRequest Parameters
- Request Parameter Location: body/json
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| order_id | string | Y | The ID of the order |
| coupon_id | string | Y | The ID of the coupon |
- Response Results:
- Response strings are as follows. General string text has been omitted. Please see Response Format Strings for more details.
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/renew_coupon?order_id=1&coupon_id=1"
{
"code": 0,
"data": {
"coupon_id": "string",
"is_successful": true,
"order_id": "",
"renew_change_flag": 0,
"renew_coupon_apy": "string"
},
"message": "string"
}
| Parameter Name | Type | Description |
|---|---|---|
| is_successful | bool | Indicates if the SET operation was successful |
| order_id | string | The ID of the order |
| coupon_id | string | The ID of the coupon |
| renew_coupon_apy | string | The coupon APY for renewal |
| renew_change_flag | int | Status of renewal in the information flow: |
- 1: Renewal information change disallowed |
||
- 2: Renewal information change allowed |
Renew Price
Interface Description
- Get Renew Order Price
GET
/structured/api/v1/renew_priceRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| order_id | string | Y | The ID of the order |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/renew_price?order_id=7148287404523302912"
{
"code": 0,
"data": {
"display_price_type": 1,
"is_percentage_price": true,
"link_prices": [
{
"linked_price": "",
"strike_price": "0",
"take_profit_price": "-0.03",
"protection_price": "0.03"
}
],
"renew_change_flag": 2
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| display_price_type | int | Type of display price: |
- 1: Includes protection_price and take_profit_price fields |
||
- 2: Price range |
||
- 3: strike_price field |
||
| is_percentage_price | bool | Indicates if the price is a percentage |
| link_prices | array | List of linked prices |
| link_prices.linked_price | string | The linked price |
| link_prices.strike_price | string | The strike price (single price) |
| link_prices.take_profit_price | string | The take-profit price |
| link_prices.protection_price | string | The protection price |
| renew_change_flag | int | Status of renewal in the information flow: |
- 1: Renewal information change disallowed |
||
- 2: Renewal information change allowed |
Renew Price
Interface Description
- Set Renew Order Price
PUT
/structured/api/v1/renew_priceRequest Parameters
- Request Parameter Location: body/json
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| order_id | int | Y | The ID of the order |
| strike_price | string | Y | The strike price (single price) |
| take_profit_price | string | Y | The take-profit price |
| protection_price | string | Y | The protection price |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
PUT "https://mapi.matrixport.com/structured/api/v1/renew_price"
{
"code": 0,
"data": {
"is_successful": true,
"order_id": "7216381559912652802",
"display_price_type": 0,
"is_percentage_price": true,
"link_prices": [
{
"linked_price": "string",
"protection_price": "string",
"strike_price": "string",
"take_profit_price": "string"
}
],
"renew_change_flag": 0
},
"message": "string"
}
| Parameter Name | Type | Description |
|---|---|---|
| is_successful | bool | Indicates if the operation was successful |
| order_id | string | Order ID |
| display_price_type | int | Type of display price: |
- 1: Includes protection_price and take_profit_price fields |
||
- 2: Price range |
||
- 3: strike_price field |
||
| is_percentage_price | bool | Indicates if the price is a percentage |
| strike_price | string | The strike price (single price) |
| take_profit_price | string | The take-profit price |
| protection_price | string | The protection price |
| renew_change_flag | int | Status of renewal in the information flow: |
- 1: Renewal information change disallowed |
||
- 2: Renewal information change allowed |
Renew Params
Interface Description
- Get renew order params
GET
/structured/api/v1/renew_paramsRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| order_id | string | Y | OrderID |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/renew_params?order_id=7216381559912652801"
{
"code": 0,
"data": {
"display_price_type": 1,
"renew_is_percentage_price": true,
"renew_tenor": "1",
"renew_coupon_id": "",
"renew_coupon_apy": "0",
"renew_strike_price": "0",
"renew_take_profit_price": "-0.01",
"renew_protection_price": "0.01",
"renew_change_flag": 2,
"renew_change_hour_ahead": 0
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| display_price_type | int | Display price type: 1=protection_price and take_profit_price fields; 2=price range; 3=strike_price |
| renew_is_percentage_price | bool | Whether the renew prices are in percentage format |
| renew_tenor | string | Renew tenor in days (string format) |
| renew_coupon_id | string | Renew coupon ID |
| renew_coupon_apy | string | Renew coupon APY (string format) |
| renew_strike_price | string | Renew strike price (string format) |
| renew_take_profit_price | string | Renew take profit price (string format) |
| renew_protection_price | string | Renew protection price (string format) |
| renew_change_flag | int | Renew change flag: 1=Renew change disallowed, 2=Renew change allowed |
| renew_change_hour_ahead | int | Hours ahead of MaturityTime allowing to change renew params |
Active Order Count
Interface Description
- Get active order number.
GET
/structured/api/v1/active_order_countRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| query_all | bool | Y | Indicates if all strategies should be queried |
| strategy_id | string | Y | The ID of the strategy |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/active_order_count"
{
"code": 0,
"data": {
"total": 1,
"all_total": 1
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| total | int | Total number of active orders |
| all_total | int | Total number of all orders |
All Invest Currency
Interface Description
- Get all invest currency.
GET
/structured/api/v1/get-all-invest-currencyRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| query_all | bool | Y | Indicates if all strategies should be queried |
| strategy_id | string | Y | The ID of the strategy |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/get-all-invest-currency"
{
"code": 0,
"data": [
"BTC",
"USDT"
],
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| data | array | currency list |
Total Position
Interface Description
- Get total position.
GET
/structured/api/v1/total-positionsRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | string | Y | The ID of the strategy |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/total-positions"
{
"code": 0,
"data": {
"total_position": "337.05",
"ask_price_status": 0
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| realized_pnl | int | Realized profit and loss |
| profit_rate | int | Profit rate |
| wining_rate | int | Winning rate |
| initial_principal_value | int | Initial principal value |
| non_converted | int | Non-converted profit and loss |
| converted | int | Converted profit and loss |
| cumulative_settlement | int | Cumulative settlement amount |
| total_pnl | int | Total profit and loss |
| no_settled_orders | bool | Indicates if there are no settled orders |
Pnl New
Interface Description
- Get Pnl Detail New Interface
GET
/structured/api/v1/pnlnewRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | int | Y | The ID of the strategy. Use 0 to query all strategies. |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/pnlnew"
{
"code": 0,
"data": {
"total_cnt": 4,
"non_converted_pnl_resp": {
"non_converted_cnt": 3,
"non_conversion_ratio": "0.75",
"initial_principal_value": "6700.04518",
"cumulative_settlement": "6702.02701081",
"average_tenor": "1",
"apy": "0.10796468",
"pnl": "1.98183081",
"profit_rate": "0.00029579"
},
"converted_pnl_resp": {
"converted_cnt": 1,
"conversion_ratio": "0.25",
"converted_initial_principal_value": "100",
"total_interest": "0.7764",
"conversion_results": [
{
"pair": "ETH-USDⓈ",
"direction": 1,
"amount": "0.02642932",
"average_price": "3783.6766137",
"pnl_rate": "-0.60356019"
}
],
"converted_pnl": "-63.8067416030832",
"converted_profit_rate": "-0.63806741",
"top_orders": [
{
"order_id": "7198941116690194432",
"pair": "ETH-USDT",
"type": "CALL",
"transaction_price": "3783.67661370023897701492130709378826",
"current_price": "1500",
"price_diff_ratio": "-1.52245107580015931800994753806253",
"direction": 1
}
]
}
},
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| total_cnt | int | Total count |
| non_converted_cnt | int | Non-converted count |
| non_conversion_ratio | string | Non-conversion ratio |
| initial_principal_value | string | Initial principal value |
| cumulative_settlement | string | Cumulative settlement |
| average_tenor | int | Average tenor in days |
| apy | string | Annual percentage yield (APY) |
| pnl | string | Profit and Loss (PnL) |
| profit_rate | string | Profit rate |
| converted_cnt | string | Converted count |
| conversion_ratio | int | Conversion ratio |
| converted_initial_principal_value | string | Initial principal value for converted PnL |
| total_interest | string | Total interest |
| conversion_results | array | Conversion results |
| conversion_results.pair | string | Currency pair |
| conversion_results.direction | int | Direction of the conversion (1=buy, 2=sell) |
| conversion_results.amount | string | Amount of currency exchanged |
| conversion_results.average_price | string | Average price of the exchange |
| conversion_results.pnl_rate | int | Profit and loss rate |
| conversion_results.buy_amount | int | Amount bought (internal use, not serialized) |
| conversion_results.sell_amount | int | Amount sold (internal use, not serialized) |
| conversion_results.usd_value | int | USD value of the conversion |
| converted_pnl | int | Profit and loss |
| converted_profit_rate | int | Profit rate |
| top_orders | array | top two orders by USD value; data for share page |
| top_orders.order_id | string | Order ID |
| top_orders.pair | string | Currency pair |
| top_orders.type | string | Type of order (BULL, BEAR) |
| top_orders.transaction_price | string | Transaction price |
| top_orders.current_price | string | Current price |
| top_orders.price_diff_ratio | int | Price difference ratio |
| top_orders.direction | int | Direction of the order (1=buy, 2=sell) |
| top_orders.value | int | Internal field (not serialized) |
Invest Days
Interface Description
- Get user invest days.
GET
/structured/api/v1/invest-daysRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | int | N | The ID of the strategy. Use 0 to query all strategies. |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/invest-days"
{
"code": 0,
"data": "1.7",
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| data | string | User invest days in string format |
All Strategy
Interface Description
- Get Strategy
GET
/structured/api/v1/all-strategyRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | string | N | The ID of the strategy |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/all-strategy?strategy_id=3"
{
"code": 0,
"data": [
{
"strategy_id": 3,
"strategy_name": [
{
"language": "en-US",
"name": "Snowball"
}
],
"convert_type": 1
}
],
"message": ""
}
| Parameter Name | Type | Description |
|---|---|---|
| strategy_id | int | Strategy ID |
| strategy_name | array | Array of strategy product, eg snowball, trend |
| strategy_name.strategy_id | string | Strategy ID |
| strategy_name.language | string | Language Code |
| strategy_name.name | string | Strategy product name |
| convert_type | int | Conversion type: 1=Convertible, 2=Not Convertible |
Strategy Type
Interface Description
- Get Strategy Type
GET
/structured/api/v1/strategy-typeRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| strategy_id | string | Y | The ID of the strategy |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/strategy-type?strategy_id=3"
{
"code": 0,
"data": {
"strategy_type_items": [
{
"base_currency": [
"BTC",
"ETH"
],
"strategy_type": 1
},
{
"base_currency": [
"ETH"
],
"strategy_type": 2
}
]
},
"message": "string"
}
| Parameter Name | Type | Description |
|---|---|---|
| strategy_type_items | array | Array of strategy type items |
| strategy_type_items.strategy_type | int | Strategy type: 1=Call, 2=Put, 3=币双币, 4=U双币 |
| strategy_type_items.base_currency | array | List of base currencies |
Skitg
Interface Description
- Set VendorSkitg
POST
/structured/api/v1/skitgRequest Parameters
- Request Parameter Location: body/json
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| vendor_id | string | Y | The ID of the vendor |
| currency | string | Y | The investment currency |
| amount | string | Y | The amount |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/skitg"
{
"code": 0,
"data": null,
"message": "string"
}
Order Renew Info
Interface Description
- Get renewal order
GET
/structured/api/v1/order_renew_infoRequest Parameters
- Request Parameter Location: query_string
| Parameter Name | Type | Mandatory | Description |
|---|---|---|---|
| meta_name | string | Y | The name of the meta |
| maturity_time | int | Y | The maturity time |
- Response Results
- Response string is as follows. General string text has been omitted. See Response Format Strings for more details:
- Data Structure & Description:
curl "https://mapi.matrixport.com/structured/api/v1/order_renew_info?maturity_time=1720598400000&meta_name=trend"
{
"code": 0,
"data": {
"count": 1,
"items": [
{
"order_id": 7160938080294526976,
"need_auto_renew": true,
"renew_strike_price": "56000",
"renew_tenor": "7",
"renew_take_profit_price": "58780",
"renew_protection_price": "53200"
}
]
},
"message": "string"
}
| Parameter Name | Type | Description |
|---|---|---|
| count | int | Total count of items in the page |
| items | array | List of RenewOrdersResp items |
| items.order_id | string | Order ID (string format) |
| items.need_auto_renew | bool | Whether auto-renewal is needed |
| items.renew_strike_price | string | Renew strike price (string format) |
| items.renew_tenor | string | Renew tenor (string format) |
| items.renew_take_profit_price | string | Renew take profit price (string format) |
| items.renew_protection_price | string | Renew protection price (string format) |
Error Codes
- Response return calls indicate the call and execution result summary for current API services. Return code messages provide additional information for the user to determine API execution.
- All interface call return values contain an error code (value) and message (error description). See below:
| Return Codes | Details |
|---|---|
| 0 | OK. |
| 12160002 | Inner Error. |
| 12160007 | Amount not balance when place order. |
| 12160013 | Quote Invalid |
| 12160015 | Quote not match. |
| 12160016 | Exceeds the maximum redeemable amount. |
| 12160017 | Redeem will make loss. |
| 12160019 | Redeem is not allowed one day before maturity. |
| 12160021 | Coupon Invalid. |