NAV Navbar
json

Changelogs

version time content
V1.0
2023-10-27
initial version

Notes

Only accredited investor are eligible to call this API service.

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&quote=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)

API hosts (beta)

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

please refer to this link

Dcp API

Index Price

Parameter Name Type Mandatory Description
base string Y Base currency, eg BTC
quote string Y Quote currency, eg USDC
curl "https://mapi.matrixport.com/dcp/api/v1/index_price??base=BTC&quote=USDT"
{
  "code": 0,
  "data": {
    "index_price": "20000"
  },
  "message": ""
}
Parameter Name Type Description
index_price string Index price in string format

User Available Balance

Parameter Name Type Mandatory Description
currency string Y Currency
payment_method int Y Payment method: 1 query user balance, 2 query cashier balance
curl "https://mapi.matrixport.com/dcp/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: 1 query user balance, 2 query cashier balance

Payment Combination

Parameter Name Type Mandatory Description
currency string Y Currency
curl "https://mapi.matrixport.com/dcp/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",
        "total_available_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.pay_channel string Should sub amount in specific channel

Tenor Config

curl "https://mapi.matrixport.com/dcp/api/v1/tenor_config"
{
  "code": 0,
  "data": [
    {
      "id": "770",
      "created_at": 1698288412520,
      "updated_at": 1698288412520,
      "deleted_at": null,
      "mini_days": 0,
      "max_days": 10
    },
    {
      "id": "771",
      "created_at": 1698288412525,
      "updated_at": 1698288412525,
      "deleted_at": null,
      "mini_days": 10,
      "max_days": 20
    },
    {
      "id": "772",
      "created_at": 1698288412530,
      "updated_at": 1698288412530,
      "deleted_at": null,
      "mini_days": 20,
      "max_days": -1
    }
  ],
  "message": ""
}

Parameter Name Type Description
data array Product term info
data.created_at int Create time in millisecond
data.updated_at int Update time in millisecond
data.deleted_at Time Delete time in millisecond
data.mini_days int Minimum term
data.max_days int Maximum term, -1 means infinite

Vendor Trading Exchanges

curl "https://mapi.matrixport.com/dcp/api/v1/trading_exchanges"
{
  "code": 0,
  "data": {
    "timestamp": 1698105600000,
    "exchanges": [
      {
        "exchanges_name": "deribit",
        "proportion": "1"
      }
    ]
  },
  "message": ""
}
Parameter Name Type Description
timestamp string Last update time in millisecond
exchanges array Vendor trade exchange info
exchanges.exchanges_name string Specific exchange, eg deribit
exchanges.proportion string Exchange trade percentage in string format

Product Overview

curl "https://mapi.matrixport.com/dcp/api/v1/product/overview"
{
  "code": 0,
  "data": [
    {
      "option_currency": "BTC",
      "tags": null,
      "mini_annualized_yield": "0.00927966101694915254237288135593",
      "max_annualized_yield": "31025.58977007061725",
      "mini_tenor": "1",
      "max_tenor": "332",
      "products": [
        {
          "dcp_type": 1,
          "option_currency": "BTC",
          "base_currency": "USDT",
          "mini_annualized_yield": "0.00927966101694915254237288135593",
          "mini_yield_rate": "0.0015",
          "mini_vendor_id": 55,
          "max_annualized_yield": "1.765337921376443665",
          "max_yield_rate": "0.009673084500692842",
          "max_vendor_id": 44
        },
        {
          "dcp_type": 2,
          "option_currency": "BTC",
          "base_currency": "USDC",
          "mini_annualized_yield": "0.01672916666666666666666666666667",
          "mini_yield_rate": "0.0011",
          "mini_vendor_id": 55,
          "max_annualized_yield": "31025.58977007061725",
          "max_yield_rate": "850.0161580841265",
          "max_vendor_id": 44
        }
      ]
    },
    {
      "option_currency": "ETH",
      "tags": null,
      "mini_annualized_yield": "0.005000000000005",
      "max_annualized_yield": "1209.607755053562986",
      "mini_tenor": "1",
      "max_tenor": "332",
      "products": [
        {
          "dcp_type": 1,
          "option_currency": "ETH",
          "base_currency": "USDT",
          "mini_annualized_yield": "0.005000000000005",
          "mini_yield_rate": "0.000013698630137",
          "mini_vendor_id": 77,
          "max_annualized_yield": "1.24627115903934871",
          "max_yield_rate": "0.006828883063229308",
          "max_vendor_id": 44
        },
        {
          "dcp_type": 2,
          "option_currency": "ETH",
          "base_currency": "USDT",
          "mini_annualized_yield": "0.009086414201295",
          "mini_yield_rate": "0.000024894285483",
          "mini_vendor_id": 77,
          "max_annualized_yield": "1209.607755053562986",
          "max_yield_rate": "33.139938494618164",
          "max_vendor_id": 44
        }
      ]
    }
  ],
  "message": ""
}
Parameter Name Type Description
option_currency string Option currency
tags array Product tag info
tags.color string Color for product display
tags.i18n array Internationalizations
tags.i18n.tag_id int Tag id
tags.i18n.language string Language
tags.i18n.name string Name
mini_annualized_yield string Minimum annualized yield,in string format
max_annualized_yield string Maximum annualized yield,in string format
mini_tenor string Minimum term
max_tenor string Maximum term
products array Best product detail
products.dcp_type int Dcp type: 1 Coin dcp, 2 USD(S) dcp
products.option_currency string Option currency is invest currency when dcp_type is 1
products.base_currency string Base currency is invest currency when dcp_type is 2
products.mini_annualized_yield string Minimum annualized yield, in string format
products.mini_yield_rate string Minimum yield rate, in string format
products.mini_vendor_id int The vendor_id of minimum annualized yield, in string format
products.max_annualized_yield string Maximum annualized yield, in string format
products.max_yield_rate string Maximum yield rate, in string format
products.max_vendor_id int The vendor_id of maximum annualized yield

Product list

Parameter Name Type Mandatory Description
dcp_type int N Dcp type: 1 Coin dcp, 2 USD(S) dcp
option_currency string N Option currency is invest currency when dcp_type is 1
base_currency string N Base currency is invest currency when dcp_type is 2
mini_left_days string N Minimum left days
max_left_days string N Maximum left days
risk_level string N Risk level: 0 all, 1 moderate, 2 high
curl "https://mapi.matrixport.com/dcp/api/v1/product/list?risk_level=1&max_left_days=20&mini_left_days=10&option_currency=BTC&base_currency=USDT&dcp_type=1"
{
  "code": 0,
  "data": [
    {
      "expiry_date": 1700208000000,
      "tenor": "16",
      "products": [
        {
          "dcp_type": 1,
          "option_currency": "BTC",
          "base_currency": "USDC",
          "link_price": "34500",
          "expiry_date": 1700208000000,
          "annualized_yield": "0.749497344224550853125",
          "yield_rate": "0.03285467810299401",
          "vendor_id": 44,
          "tracking_source": "DERIBIT",
          "tags": null,
          "risk_level": 1,
          "index_price": "20000"
        },
        {
          "dcp_type": 1,
          "option_currency": "BTC",
          "base_currency": "USDT",
          "link_price": "35000",
          "expiry_date": 1700208000000,
          "annualized_yield": "0.629625",
          "yield_rate": "0.0276",
          "vendor_id": 55,
          "tracking_source": "DERIBIT",
          "tags": null,
          "risk_level": 1,
          "index_price": "20000"
        },
        {
          "dcp_type": 1,
          "option_currency": "BTC",
          "base_currency": "USDC",
          "link_price": "35500",
          "expiry_date": 1700208000000,
          "annualized_yield": "0.496406552788073459375",
          "yield_rate": "0.02176028724550459",
          "vendor_id": 44,
          "tracking_source": "DERIBIT",
          "tags": null,
          "risk_level": 1,
          "index_price": "20000"
        },
        {
          "dcp_type": 1,
          "option_currency": "BTC",
          "base_currency": "USDC",
          "link_price": "36000",
          "expiry_date": 1700208000000,
          "annualized_yield": "0.4139600383293692825",
          "yield_rate": "0.018146193461013448",
          "vendor_id": 44,
          "tracking_source": "DERIBIT",
          "tags": null,
          "risk_level": 1,
          "index_price": "20000"
        },
        {
          "dcp_type": 1,
          "option_currency": "BTC",
          "base_currency": "USDC",
          "link_price": "36500",
          "expiry_date": 1700208000000,
          "annualized_yield": "0.356625241661117045625",
          "yield_rate": "0.015632887305692802",
          "vendor_id": 44,
          "tracking_source": "DERIBIT",
          "tags": null,
          "risk_level": 1,
          "index_price": "20000"
        },
        {
          "dcp_type": 1,
          "option_currency": "BTC",
          "base_currency": "USDC",
          "link_price": "37000",
          "expiry_date": 1700208000000,
          "annualized_yield": "0.3293558679572864221875",
          "yield_rate": "0.014437517499497487",
          "vendor_id": 44,
          "tracking_source": "DERIBIT",
          "tags": null,
          "risk_level": 1,
          "index_price": "20000"
        },
        {
          "dcp_type": 1,
          "option_currency": "BTC",
          "base_currency": "USDC",
          "link_price": "37500",
          "expiry_date": 1700208000000,
          "annualized_yield": "0.2860976841987304459375",
          "yield_rate": "0.012541268348437499",
          "vendor_id": 44,
          "tracking_source": "DERIBIT",
          "tags": null,
          "risk_level": 1,
          "index_price": "20000"
        },
        {
          "dcp_type": 1,
          "option_currency": "BTC",
          "base_currency": "USDC",
          "link_price": "38000",
          "expiry_date": 1700208000000,
          "annualized_yield": "0.2423198092818396084375",
          "yield_rate": "0.010622238215094339",
          "vendor_id": 44,
          "tracking_source": "DERIBIT",
          "tags": null,
          "risk_level": 1,
          "index_price": "20000"
        },
        {
          "dcp_type": 1,
          "option_currency": "BTC",
          "base_currency": "USDC",
          "link_price": "39000",
          "expiry_date": 1700208000000,
          "annualized_yield": "0.1789641857793624015625",
          "yield_rate": "0.007845005404026845",
          "vendor_id": 44,
          "tracking_source": "DERIBIT",
          "tags": null,
          "risk_level": 1,
          "index_price": "20000"
        },
        {
          "dcp_type": 1,
          "option_currency": "BTC",
          "base_currency": "USDC",
          "link_price": "40000",
          "expiry_date": 1700208000000,
          "annualized_yield": "0.129752068850694439375",
          "yield_rate": "0.005687761922222222",
          "vendor_id": 44,
          "tracking_source": "DERIBIT",
          "tags": null,
          "risk_level": 1,
          "index_price": "20000"
        }
      ]
    }
  ],
  "message": ""
}
Parameter Name Type Description
data array
expiry_date int Product expiry date
tenor string Tenor calculated from expiry date
products array Product detail
products.dcp_type int Dcp type: 1 Coin dcp, 2 USD(S) dcp
products.option_currency string Option currency is invest currency when dcp_type is 1
products.base_currency string Base currency is invest currency when dcp_type is 2
products.link_price string Link price
products.expiry_date int Order expiry date when selecting this product
products.annualized_yield string Product annualized yield (The actual value is based on the quote)
products.yield_rate string Product yield rate (The actual value is based on the quote)
products.vendor_id int The vendor_id of this product
products.tracking_source string Maximum annualized yield
products.tags array Product tag info
products.tags.color string Color for product display
products.tags.i18n array Internationalizations
products.tags.i18n.tag_id int Tag id
products.tags.i18n.language string Language
products.tags.i18n.name string Name
products.risk_level int Risk level: 0 all, 1 moderate, 2 high
products.index_price string Index price, base is option_currency and quote is base_currency

Product detail

Parameter Name Type Mandatory Description
dcp_type int N Dcp type: 1 Coin dcp, 2 USD(S) dcp
option_currency string N Option currency is invest currency when dcp_type is 1
base_currency string N Base currency is invest currency when dcp_type is 2
link_price string N Link price
expiry_date int N Order expiry date when selecting this product
tracking_source string N Source of settlement index price data, eg DERIBIT,BINANCE
curl "https://mapi.matrixport.com/dcp/api/v1/product/detail?option_currency=BTC&base_currency=USDT&dcp_type=1&expiry_date=1698825600000&link_price=34400&tracking_source=DERIBIT"
{
  "code": 0,
  "data": [
    {
      "vendor_id": 55,
      "dcp_type": 1,
      "underlying_pair": "BTC-USDT",
      "option_currency": "BTC",
      "base_currency": "USDT",
      "tracking_source": "DERIBIT",
      "link_price": "35000",
      "expiry_date": 1698912000000,
      "annualized_yield": "0.59552631578947368421052631578947",
      "yield_rate": "0.0031",
      "redeemable": true,
      "mini_deposit_amount": "0.002",
      "max_deposit_amount": "89",
      "deposit_step_amount": "0.001",
      "tenor": "1.9",
      "tags": null
    },
    {
      "vendor_id": 55,
      "dcp_type": 1,
      "underlying_pair": "BTC-USDC",
      "option_currency": "BTC",
      "base_currency": "USDC",
      "tracking_source": "DERIBIT",
      "link_price": "35000",
      "expiry_date": 1698912000000,
      "annualized_yield": "0.59552631578947368421052631578947",
      "yield_rate": "0.0031",
      "redeemable": true,
      "mini_deposit_amount": "0.002",
      "max_deposit_amount": "89",
      "deposit_step_amount": "0.001",
      "tenor": "1.9",
      "tags": null
    }
  ],
  "message": ""
}
Parameter Name Type Description
data array Product detail
vendor_id int The vendor_id of this product
underlying_pair string Underlying pair
option_currency string Option currency is invest currency when dcp_type is 1
base_currency string Base currency is invest currency when dcp_type is 2
tracking_source string Source of settlement index price data, eg DERIBIT,BINANCE
link_price string Link price
expiry_date string Order expiry date when selecting this product
annualized_yield string Product annualized yield (The actual value is based on the quote)
yield_rate string Product yield rate (The actual value is based on the quote)
redeemable bool Wether the product supports redemption
mini_deposit_amount string Minimum deposit amount set for the product
max_deposit_amount string Maximum deposit amount set for the product
tenor string Tenor calculated from expiry date
tags array Product tag info
tags.color string Color for product display
tags.i18n array Internationalizations
tags.i18n.tag_id int Tag id
tags.i18n.language string Language
tags.i18n.name string Name

Get product agreement

curl "https://mapi.matrixport.com/dcp/api/v1/product/agreement?biz=dcp"
{
  "code": 0,
  "data": "USDⓈ双虚拟货币产品协议\n本USDⓈ双虚拟货币产品协议(本“协议”)由您(以下还简称“客户”)和成立于巴拿马的实体Flying Otter Inc.(“我们”、“公司”或“Flying Otter”,与您一起合称“协议双方”,分别简称“协议一方”)之间订立。本协议载明了您投资公司的USDⓈ双虚拟货币产品(“USDⓈ双币产品”)应遵循的条款和条件。通过点击“[同意]”,您同意您已阅读、了解并接受本协议以及 Matrixport [隐私政策]中包含的所有条款和条件。如您对USDⓈ双币产品和/或本协议有任何疑问,请发送电子邮件至 [[email protected]],联络我们的客服 .......n",
  "message": ""
}

Place order quote

Parameter Name Type Mandatory Description
vendor_id int Y Vendor id
underlying_pair string Y Underlying pair
tracking_source string Y Source of settlement index price data, eg DERIBIT,BINANCE
dcp_type int Y Dcp type: 1 Coin dcp, 2 USD(S) dcp
deposit_amount string Y Deposit amount, in string format
deposit_currency string Y Deposit currency
expiry_date int Y Order expiry date
strike_price string Y Option Exercise Price
curl "https://mapi.matrixport.com/dcp/api/v1/quote?dcp_type=1&deposit_amount=10&deposit_currency=BTC&expiry_date=1698825600000&strike_price=34600&tracking_source=DERIBIT&underlying_pair=BTC-USDT&vendor_id=77"
{
  "code": 0,
  "data": {
    "quote_id": "195387854",
    "underlying_pair": "BTC-USDT",
    "tracking_source": "DERIBIT",
    "dcp_type": 1,
    "deposit_amount": "10",
    "deposit_currency": "BTC",
    "premium_amount": "0.03104471",
    "tenor": "0.9",
    "annualized_yield": "1.25903546111111111111111111111111",
    "yield_rate": "0.003104471",
    "index_price": "20000",
    "price_expire_time_mill": 1698744747000
  },
  "message": ""
}
Parameter Name Type Description
quote_id string Quote id
underlying_pair string Underlying pair
tracking_source string Source of settlement index price data, eg DERIBIT,BINANCE
dcp_type int Dcp type: 1 Coin dcp, 2 USD(S) dcp
deposit_amount string Deposit amount
deposit_currency string Deposit currency
premium_amount string Earnings provided to users by the matrixport (in deposit currency)
tenor string Tenor calculated from expiry date
annualized_yield string Annualized yield = premium_amount / deposit_amount * 365 / tenor
yield_rate string Yield rate = premium_amount / deposit_amount
index_price string Index price
price_expire_time_mill int Price expire time in millisecond

Place order

Parameter Name Type Mandatory Description
amount string Y Invest amount in string format
currency string Y invest currency
quote_id string Y QuoteID returns in quote
coupon_id string N Coupon id
remark string N Remark
now int N Now timestamp in millisecond
curl -H "Content-Type:application/json" -X POST --data '{
    "amount": 10,
    "currency": "BTC",
    "quote_id": "195387854"
}'
https://mapi.matrixport.com/dcp/api/v1/order
{
  "code": 0,
  "data": {
    "order_id": "7125051716340613120"
  },
  "message": ""
}
Parameter Name Type Description
order_id string OrderID

Get order result

Parameter Name Type Mandatory Description
order_id int Y OrderID
curl "https://mapi.matrixport.com/dcp/api/v1/order/result?order_id=7125051716340613120"
{
  "code": 0,
  "data": {
    "status": 2,
    "failed_code": 0,
    "failed_message": ""
  },
  "message": ""
}
Parameter Name Type Description
status int Place order status: 0-processing 1-success 2-failed
failed_code int Failed code: 17000004 not balance
failed_message string Failed message

Redeem order quote

Parameter Name Type Mandatory Description
order_id int Y OrderID
amount string Y Redemption amount in string format
curl "https://mapi.matrixport.com/dcp/api/v1/redeem/quote?order_id=7125082649395527680&amount=200"
{
  "code": 0,
  "data": {
    "quote_id": "matrixport7125082699345494016",
    "underlying_pair": "BTC-USDT",
    "tracking_source": "DERIBIT",
    "type": "PUT",
    "settle_time_mill": 1698998400000,
    "strike_price": "30500",
    "premium_amount": "-0.25609748",
    "price_expire_time_mill": 1698752123115,
    "index_price": "20000",
    "coupon_tenor": "0"
  },
  "message": ""
}
Parameter Name Type Description
quote_id string Quote id
underlying_pair string Underlying pair
tracking_source string Source of settlement index price data, eg DERIBIT,BINANCE
type string Option type, CALL or PUT
settle_time_mill int option settle time in millisecond, eg. 2023-08-25T16:00:00 +08:00 is 1692950400000.
strike_price string Option Exercise Price in string format
premium_amount string Early redemption fee, negative, in string format
price_expire_time_mill int Price expire time in millisecond
index_price string Index price in string format
coupon tenor string Coupon tenor in string format

Redeem order

Parameter Name Type Mandatory Description
order_id int Y OrderID
amount string Y Redeem amount in string format
quote_id string Y QuoteID returns in redeem quote
remark string N Remark
curl -H "Content-Type:application/json" -X POST --data '{
    "amount": 200,
    "order_id": "7125082649395527680",
    "quote_id": "matrixport7125082699345494016"
}'
https://mapi.matrixport.com/dcp/api/v1/redeem
{
  "code": 0,
  "data": {
    "redeem_id": "7125082731918458880"
  },
  "message": ""
}
Parameter Name Type Description
redeem_id string Redeem order idd

Get redeem result

Parameter Name Type Mandatory Description
redeem_id int Y Redeem order id
curl "https://mapi.matrixport.com/dcp/api/v1/redeem/result?redeem_id=7125082731918458880"
{
  "code": 0,
  "data": {
    "status": 1,
    "failed_code": 0,
    "failed_message": ""
  },
  "message": ""
}
Parameter Name Type Description
status int Place order status: 0-processing 1-success 2-failed
failed_code int Failed code: 17000004 not balance
failed_message string Failed message

Get Coupon

Parameter Name Type Mandatory Description
dcpType int Y Dcp type: 1 Coin dcp, 2 USD(S) dcp
currency string Y Invest currency
expiry_date int Y Expiry date in millisecond
amount string N Invest amount in string format
curl "https://mapi.matrixport.com/dcp/api/v1/order/coupons?currency=BTC&dcpType=1&expiry_date=1698912000000"
{
    "code": 0,
    "data": {
        "coupons": [
            {
                "id": "7114966916053352448",
                "available": true,
                "expiration_time": 1727876302773,
                "year_rate": 300000,
                "min_amount": 100000000,
                "max_amount": 10000000000000,
                "template_names": [
                    {
                        "item": "TemplateName",
                        "language": "zh-TW",
                        "data": "dcp111111",
                        "trigger": ""
                    },
                    {
                        "item": "TemplateName",
                        "language": "Zh-CN",
                        "data": "dcp111111",
                        "trigger": ""
                    },
                    {
                        "item": "TemplateName",
                        "language": "En-US",
                        "data": "dcp111111",
                        "trigger": ""
                    },
                    {
                        "item": "TemplateName",
                        "language": "Ru-RU",
                        "data": "dcp111111",
                        "trigger": ""
                    }
                ],
                "active_additional_info": [
                    {
                        "item": "ActiveAdditionalInfo_0",
                        "language": "zh-TW",
                        "data": "11",
                        "trigger": ""
                    },
                    {
                        "item": "ActiveAdditionalInfo_0",
                        "language": "zh-CN",
                        "data": "11",
                        "trigger": ""
                    },
                    {
                        "item": "ActiveAdditionalInfo_0",
                        "language": "en",
                        "data": "11",
                        "trigger": ""
                    },
                    {
                        "item": "ActiveAdditionalInfo_0",
                        "language": "ru-RU",
                        "data": "11",
                        "trigger": ""
                    }
                ],
                "department": 2,
                "user_id": "605986",
                "promotion_id": "7114966877277011968",
                "template_id": "7114891868776972288",
                "template_shot": "15837148944201278724",
                "online": 1696340302773,
                "deadline": 1727876302773,
                "created_at": 1696340302773,
                "status": 0,
                "source": "oms",
                "created_serial_no": "P7114966877277011968T7114891868776972288S2",
                "used_serial_no": "",
                "lock_serial_no": "",
                "template": {
                    "id": "7114891868776972288",
                    "is_active": 0,
                    "template_shot": "15837148944201278724",
                    "created_on": 0,
                    "promotion_id": "0",
                    "conditions": {
                        "CouponDuration": [
                            {
                                "group": "CouponDuration",
                                "type": "CouponUnlimited",
                                "num": 0,
                                "str": "",
                                "unit": ""
                            }
                        ],
                        "Department": [
                            {
                                "group": "Department",
                                "type": "Department",
                                "num": 0,
                                "str": "Fixed",
                                "unit": ""
                            }
                        ],
                        "OrderType": [
                            {
                                "group": "OrderType",
                                "type": "OrderType",
                                "num": 0,
                                "str": "ORDER_TYPE_ALL",
                                "unit": ""
                            }
                        ],
                        "ProductTenor": [
                            {
                                "group": "ProductTenor",
                                "type": "PRODUCT_TENOR_ALL",
                                "num": 0,
                                "str": "",
                                "unit": ""
                            }
                        ],
                        "ProductType": [
                            {
                                "group": "ProductType",
                                "type": "ProductType",
                                "num": 0,
                                "str": "DCP_U",
                                "unit": ""
                            },
                            {
                                "group": "ProductType",
                                "type": "ProductType",
                                "num": 0,
                                "str": "DCP_COIN",
                                "unit": ""
                            }
                        ],
                        "TemplateType": [
                            {
                                "group": "TemplateType",
                                "type": "TemplateType",
                                "num": 0,
                                "str": "TemplateTypeHike",
                                "unit": ""
                            }
                        ],
                        "TemplateValue": [
                            {
                                "group": "TemplateValue",
                                "type": "TemplateValue",
                                "num": 30000000,
                                "str": "TemplateValueHikeAPR",
                                "unit": "percent"
                            }
                        ],
                        "Threshold": [
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_CEIL",
                                "num": 10000000000000,
                                "str": "",
                                "unit": "USDT"
                            },
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_CHECKED",
                                "num": 0,
                                "str": "",
                                "unit": "ETH"
                            },
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_CEIL",
                                "num": 10000000000000,
                                "str": "",
                                "unit": "BTC"
                            },
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_FLOOR",
                                "num": 100000000,
                                "str": "",
                                "unit": "USDT"
                            },
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_CHECKED",
                                "num": 0,
                                "str": "",
                                "unit": "USDC"
                            },
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_CEIL",
                                "num": 10000000000000,
                                "str": "",
                                "unit": "USDC"
                            },
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_CHECKED",
                                "num": 0,
                                "str": "",
                                "unit": "USDT"
                            },
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_CHECKED",
                                "num": 0,
                                "str": "",
                                "unit": "BTC"
                            },
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_FLOOR",
                                "num": 100000000,
                                "str": "",
                                "unit": "ETH"
                            },
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_FLOOR",
                                "num": 100000000,
                                "str": "",
                                "unit": "BTC"
                            },
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_CEIL",
                                "num": 10000000000000,
                                "str": "",
                                "unit": "ETH"
                            },
                            {
                                "group": "Threshold",
                                "type": "THRESHOLD_FLOOR",
                                "num": 100000000,
                                "str": "",
                                "unit": "USDC"
                            }
                        ]
                    },
                    "i18ns": {
                        "TemplateName": [
                            {
                                "item": "TemplateName",
                                "language": "zh-TW",
                                "data": "dcp111111",
                                "trigger": ""
                            },
                            {
                                "item": "TemplateName",
                                "language": "Zh-CN",
                                "data": "dcp111111",
                                "trigger": ""
                            },
                            {
                                "item": "TemplateName",
                                "language": "En-US",
                                "data": "dcp111111",
                                "trigger": ""
                            },
                            {
                                "item": "TemplateName",
                                "language": "Ru-RU",
                                "data": "dcp111111",
                                "trigger": ""
                            }
                        ],
                        "ActiveAdditionalInfo_0": [
                            {
                                "item": "ActiveAdditionalInfo_0",
                                "language": "zh-TW",
                                "data": "11",
                                "trigger": ""
                            },
                            {
                                "item": "ActiveAdditionalInfo_0",
                                "language": "zh-CN",
                                "data": "11",
                                "trigger": ""
                            },
                            {
                                "item": "ActiveAdditionalInfo_0",
                                "language": "en",
                                "data": "11",
                                "trigger": ""
                            },
                            {
                                "item": "ActiveAdditionalInfo_0",
                                "language": "ru-RU",
                                "data": "11",
                                "trigger": ""
                            }
                        ]
                    },
                    "alerts": {}
                },
                "modified": null,
                "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
year_rate string Yield rate in string format
min_amount int Min usable amount
max_amount int Max usable amount
template_names array Templates info
template_names.item string Coupon template item
template_names.language string Coupon template language
template_names.data string Coupon template data
template_names.trigger string Coupon template trigger
active_additional_info array Active additional info(same as template_names)
department string Department
user_id string UserID
promotion_id string PromotionID
template_id string TemplateID
template_shot string Template shot
online string Online time in millisecond
deadline string Deadline time in millisecond
created_at string Created at in millisecond
status string Coupon status: 0 unused, 1 expired, 2 used 3 locked
source string Source
created_serial_no string Created serial number
used_serial_no string Used serial number
template object
currency array Support currencies by this coupon
currency_result bool Currency validation result
amount_result bool Amount validation result
product_tenor_check_result bool Product tenor validation result
order_type_result bool Order type validation result
coupon_period_result bool Coupon period validation result
currency_level int Currency level (use for sort)
not_available_result_level int Coupon not available reason
vip_promotion bool Is vip promotion

Order list

Parameter Name Type Mandatory Description
offset int Y Offset, eg 0
limit int Y Limit, eg 10
invest_currency string N Invest currency
status_category int N Status category: 0: all orders, 1: active orders 2: settled orders
order_sort_by int N Order sort by: 0: maturity_time asc, 1: maturity_time desc, 3: created_at asc, 4: created_at desc, other: recommend sort
curl "https://mapi.matrixport.com/dcp/api/v1/orders?status_category=1&order_sort_by=4&invest_currency=&limit=10&offset=0"
{
  "code": 0,
  "data": {
    "total": 2,
    "items": [
      {
        "id": 7125082649395528000,
        "user_id": "670173",
        "vendor_id": 66,
        "purchase_time": 1698752081250,
        "invest_amount": "200",
        "invest_currency": "USDT",
        "dcp_type": 2,
        "option_type": 2,
        "linked_price": "30500",
        "coupon_year_rate": 0,
        "annualized_yield": "0",
        "yield_rate": "0.00057494",
        "underlying_pair": "BTC-USDT",
        "status": 240,
        "tenor": "2.8",
        "coupon_tenor": "0",
        "transferred": false,
        "estimated_settle_amount": "0",
        "estimated_settle_currency": "",
        "estimated_settle_time": 0,
        "estimated_settle_price": "0",
        "settled_amount": "199.85889138",
        "settled_currency": "USDT",
        "settlement_time": 1698912000000,
        "settlement_price": "0",
        "profit": "0",
        "coupon_profit": "0",
        "redemption_date": 1698752100925,
        "redeem_yield_rate": "-0.0012804874",
        "maturity_time": 1698998400000,
        "transaction_price": "0",
        "instrument": "BTC-3NOV23-30500-P",
        "premium_amount": "0.11498886",
        "pnl": "-0.14110862",
        "pnl_rate": "-0.0007055431",
        "redeemable": true
      },
      {
        "id": 7125082312731329000,
        "user_id": "670173",
        "vendor_id": 77,
        "purchase_time": 1698752000984,
        "invest_amount": "121",
        "invest_currency": "USDT",
        "dcp_type": 2,
        "option_type": 2,
        "linked_price": "32600",
        "coupon_year_rate": 0,
        "annualized_yield": "0.0062460625",
        "yield_rate": "0.00001369",
        "underlying_pair": "BTC-USDT",
        "status": 200,
        "tenor": "0.8",
        "coupon_tenor": "0",
        "transferred": true,
        "estimated_settle_amount": "0.0037117",
        "estimated_settle_currency": "BTC",
        "estimated_settle_time": 1698829200000,
        "estimated_settle_price": "20000",
        "settled_amount": "0",
        "settled_currency": "",
        "settlement_time": 0,
        "settlement_price": "0",
        "profit": "0",
        "coupon_profit": "0",
        "redemption_date": 0,
        "redeem_yield_rate": "0",
        "maturity_time": 1698825600000,
        "transaction_price": "32599.6174259773149769647331411482609",
        "instrument": "BTC-1NOV23-32600-P",
        "premium_amount": "0.00165753",
        "pnl": "0",
        "pnl_rate": "0",
        "redeemable": false
      }
    ]
  },
  "message": ""
}
Parameter Name Type Description
total int Total order number
items array Order Item array
items.id int Order id
items.user_id string User id
items.vendor_id int Vendor id
items.purchase_time int User purchase time in millisecond eg. 2023-08-25T16:00:00 +08:00 is 1692950400000
items.invest_amount string Invest amount, in string format
items.invest_currency string Invest currency
items.dcp_type int Dcp type: 1 Coin dcp, 2 USD(S) dcp
items.option_type int Option type: 1 Call Option, 2 Put Option
items.linked_price string Linked price in string format
items.coupon_year_rate string Coupon annual interest rate, in string format
items.annualized_yield string Product annualized yield, in string format
items.yield_rate string Order Yield rate in string format
items.underlying_pair string Underlying pair
items.status int Order status
items.tenor string Tenor in string format
items.coupon_tenor string Coupon tenor in string format
items.transferred bool Is order transferred
items.estimated_settle_amount string Estimated settled amount calculated based on the current index price, in string format
items.estimated_settle_currency string Estimated settled currency calculated based on the current index price
items.estimated_settle_time int Estimated settled time in millisecond calculated based on the current index price
items.estimated_settle_price string Current index price, in string format
items.settled_amount string Actually settled amount when order settled, in string format
items.settled_currency string Actually settled currency
items.settlement_time int Actually settled time in millisecond
items.settlement_price string Actually settled price, in string format
items.profit string Profit(without coupon profit) in string format
items.coupon_profit string Coupon profit in string format
items.redemption_date int Redemption date in millisecond
items.redeem_yield_rate string Order redeem yield rate in string format
items.maturity_time int Order expiry date in millisecond
items.transaction_price string Transaction price when order transferred, in string format
items.instrument string Instrument of option
items.premium_amount string Premium amount in string format
items.pnl string Order PnL in string format
items.pnl_rate string Order PnL rate in string format
items.redeemable bool Is order redeemable

Order detail

Parameter Name Type Mandatory Description
id int Y OrderID
curl "https://mapi.matrixport.com/dcp/api/v1/order/7125082649395527680"
{
  "code": 0,
  "data": {
    "id": 7125082649395528000,
    "user_id": "670173",
    "vendor_id": 66,
    "purchase_time": 1698752081250,
    "invest_amount": "200",
    "invest_currency": "USDT",
    "dcp_type": 2,
    "option_type": 2,
    "linked_price": "30500",
    "coupon_year_rate": 0,
    "annualized_yield": "0",
    "yield_rate": "0.00057494",
    "underlying_pair": "BTC-USDT",
    "status": 240,
    "tenor": "2.8",
    "coupon_tenor": "0",
    "transferred": false,
    "estimated_settle_amount": "0",
    "estimated_settle_currency": "",
    "estimated_settle_time": 0,
    "estimated_settle_price": "0",
    "settled_amount": "199.85889138",
    "settled_currency": "USDT",
    "settlement_time": 1698912000000,
    "settlement_price": "0",
    "profit": "0",
    "coupon_profit": "0",
    "redemption_date": 1698752100925,
    "redeem_yield_rate": "-0.0012804874",
    "maturity_time": 1698998400000,
    "transaction_price": "0",
    "instrument": "BTC-3NOV23-30500-P",
    "premium_amount": "0.11498886",
    "pnl": "-0.14110862",
    "pnl_rate": "-0.0007055431",
    "redeemable": true
  },
  "message": ""
}
Parameter Name Type Description
id int Order id
user_id string User id
vendor_id int Vendor id
purchase_time int User purchase time in millisecond eg. 2023-08-25T16:00:00 +08:00 is 1692950400000
invest_amount string Invest amount, in string format
invest_currency string Invest currency
dcp_type int Dcp type: 1 Coin dcp, 2 USD(S) dcp
option_type int Option type: 1 Call Option, 2 Put Option
linked_price string Linked price in string format
coupon_year_rate string Coupon annual interest rate, in string format
annualized_yield string Product annualized yield, in string format
yield_rate string Order Yield rate in string format
underlying_pair string Underlying pair
status int Order status
tenor string Tenor in string format
coupon_tenor string Coupon tenor in string format
transferred bool Is order transferred
estimated_settle_amount string Estimated settled amount calculated based on the current index price, in string format
estimated_settle_currency string Estimated settled currency calculated based on the current index price
estimated_settle_time int Estimated settled time in millisecond calculated based on the current index price
estimated_settle_price string Current index price, in string format
settled_amount string Actually settled amount when order settled, in string format
settled_currency string Actually settled currency
settlement_time int Actually settled time in millisecond
settlement_price string Actually settled price, in string format
profit string Profit(without coupon profit) in string format
coupon_profit string Coupon profit in string format
redemption_date int Redemption date in millisecond
redeem_yield_rate string Order redeem yield rate in string format
maturity_time int Order expiry date in millisecond
transaction_price string Transaction price when order transferred, in string format
instrument string Instrument of option
premium_amount string Premium amount in string format
pnl string Order PnL in string format
pnl_rate string Order PnL rate in string format
redeemable bool Is order redeemable

Active order count

curl "https://mapi.matrixport.com/dcp/api/v1/active_order_count"
{
  "code": 0,
  "data": {
    "total": 2
  },
  "message": ""
}
Parameter Name Type Description
total int Total number of open orders

All invest currency

curl "https://mapi.matrixport.com/dcp/api/v1/get-all-invest-currency"
{
  "code": 0,
  "data": [
    "BTC",
    "USDT"
  ],
  "message": ""
}
Parameter Name Type Description
data array currency list

Total position

curl "https://mapi.matrixport.com/dcp/api/v1/total-positions"
{
  "code": 0,
  "data": {
    "total_position": "337.05",
    "ask_price_status": 0
  },
  "message": ""
}
Parameter Name Type Description
total_position string Total position valued in USD
ask_price_status int System ask price failed when ask_price_status equals 1

PnL

curl "https://mapi.matrixport.com/dcp/api/v1/pnl"
{
  "code": 0,
  "data": {
    "realized_pnL": "0",
    "profit_rate": "0",
    "wining_rate": "0",
    "initial_principal_value": "0",
    "non_converted": "0",
    "converted": "0",
    "cumulative_settlement": "0",
    "total_pnl": "0",
    "no_settled_orders": true,
    "invest_days": 0
  },
  "message": ""
}
Parameter Name Type Description
realized_pnL string Order id
profit_rate string Profit rate
wining_rate string Wining rate = non_converted / (non_converted + converted)
initial_principal_value string Cumulative initial invest amount valued in USD
non_converted string None converted settled order count
converted string Converted settled order count
cumulative_settlement string Cumulative settled amount valued in USD
total_pnl string Total pnl = cumulative_settlement - initial_principal_value
no_settled_orders bool True when no settle orders
invest_days string Invest days in string format(deprecated)

Invest days

curl "https://mapi.matrixport.com/dcp/api/v1/invest-days"
{
  "code": 0,
  "data": "0.1",
  "message": ""
}
Parameter Name Type Description
data string User invest days in string format

Error Codes

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.