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)

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-request-id string N - Globally unique trace id, used for tracing requests, Strongly recommended to pass in the request header.

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: 0 query user balance, 1 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: 0 query user balance, 1 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 Source of settlement index price data, eg DERIBIT,BINANCE
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

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": {
    "annualized_yield": 0.5955263,
    "base_currency": "USDT",
    "dcp_type": 1,
    "deposit_amount": 10,
    "deposit_currency": "BTC",
    "expiry_date": 1698912000000,
    "index_price": 20000,
    "link_price": 35000,
    "max_buy_of_best": 1000000,
    "option_currency": "BTC",
    "premium_amount": 0.03104471,
    "price_expire_time_mill": 1698744747000,
    "quote_id": "195387854",
    "redeemable": true,
    "tags": [
      {
        "color": "#FFE2E2",
        "i18n": [
          {
            "language": "en-US",
            "name": "Popular"
          }
        ]
      }
    ],
    "tenor": 7,
    "tenor_flag": 0,
    "tracking_source": "DERIBIT",
    "underlying_pair": "BTC-USDT",
    "variants": [
      {
        "base_currency": "USDT",
        "global_deposit_step_amount": 1,
        "global_max_deposit_amount": 10000,
        "global_min_deposit_amount": 100
      }
    ],
    "vendor_id": 55,
    "yield_rate": 0.0031
  },
  "message": ""
}
Parameter Name Type Description
redeemable bool Wether the product supports redemption
quote_id string Quote id
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
dcp_type int Dcp type: 1 Coin dcp, 2 USD(S) dcp
link_price string Link price
expiry_date string Order expiry date when selecting this product
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
vendor_id int The vendor_id of this product
tenor_flag int 0: No operation, 1: Round down
max_buy_of_best string The maximum purchase amount for the product
tags array Tag entity
tags.color string Color for product display
tags.i18n array I18n entity
tags.i18n.language string Language
tags.i18n.name string Name
variants array Variants entity
variants.base_currency string Base currency
variants.global_min_deposit_amount string The minimum purchase amount for the product across all vendors
variants.global_max_deposit_amount string The maximum purchase amount for the product across all vendors
variants.global_deposit_step_amount string The maximum purchase amount step size for the product across all vendors

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
out_serial_number string N Max length 32, unique serial_number provided by client
curl -H "Content-Type:application/json" -X POST --data '{
    "amount": 10,
    "currency": "BTC",
    "quote_id": "195387854",
    "out_serial_number": "7361941259143032832"
}'
https://mapi.matrixport.com/dcp/api/v1/order
{
  "code": 0,
  "data": {
    "order_id": "7125051716340613120"
  },
  "message": ""
}
Parameter Name Type Description
order_id string OrderID

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 true means available
year_rate int Coupon annual interest rate in E8 (e.g., 1e7 = 0.1)
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 int Coupon annual interest rate in E8 (e.g., 1e7 = 0.1)
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 Amount user receives after settlement. Unit: items.settled_currency
items.settled_currency string Currency for items.settled_amount/items.profit/items.pnl
items.settlement_time int Actually settled time in millisecond
items.settlement_price string Actually settled price, in string format
items.profit string Equity amount (profit without coupon). Unit: items.settled_currency
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, only applicable to redeemed orders. Unit: items.settled_currency
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 N OrderID
out_serial_number string N Serial number provided by client, if exist.
curl "https://mapi.matrixport.com/dcp/api/v1/order?id=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 0/100: Processing, 110/120: Failed, 200: Active, 210/220: Settling, 230: Settled, 240: Redemption Processing, 250: Redeemed
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 Amount user receives after settlement. Unit: settled_currency
settled_currency string Currency for settled_amount/profit/pnl
settlement_time int Actually settled time in millisecond
settlement_price string Actually settled price, in string format
profit string Equity amount (profit without coupon). Unit: settled_currency
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, only applicable to redeemed orders. Unit: settled_currency
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/v2/pnl"
{
    "code": 0,
    "data": {
        "total_cnt": 48,
        "non_converted_pnl_resp": {
            "non_converted_cnt": 37,
            "non_conversion_ratio": "0.77083333",
            "non_converted_initial_principal_value": "164103.5",
            "cumulative_settlement": "164668.27684732",
            "average_tenor": "1.72377615",
            "apy": "0.72873736",
            "non_converted_pnl": "564.77684732",
            "non_converted_profit_rate": "0.00344158"
        },
        "converted_pnl_resp": {
            "converted_cnt": 11,
            "conversion_ratio": "0.22916666",
            "converted_initial_principal_value": "49385",
            "total_interest": "526.07394293",
            "conversion_results": [
                {
                    "pair": "ETH-BTC",
                    "direction": 1,
                    "amount": "30.80648333",
                    "average_price": "0.03570676",
                    "pnl_rate": "0.68035408"
                },
                {
                    "pair": "ETH-BTC",
                    "direction": 2,
                    "amount": "11",
                    "average_price": "0.05519101",
                    "pnl_rate": "-0.08713357"
                },
                {
                    "pair": "LTC-USDⓈ",
                    "direction": 1,
                    "amount": "31.61478808",
                    "average_price": "94.89230142",
                    "pnl_rate": "0.5807394"
                },
                {
                    "pair": "LTC-USDⓈ",
                    "direction": 2,
                    "amount": "15",
                    "average_price": "71.40329935",
                    "pnl_rate": "-1.10074326"
                },
                {
                    "pair": "BTC-USDⓈ",
                    "direction": 2,
                    "amount": "0.1",
                    "average_price": "65456.69",
                    "pnl_rate": "-0.75688688"
                },
                {
                    "pair": "BTC-USDⓈ",
                    "direction": 1,
                    "amount": "0.05559963",
                    "average_price": "59982.41355203",
                    "pnl_rate": "0.91722862"
                },
                {
                    "pair": "BNB-USDⓈ",
                    "direction": 2,
                    "amount": "1.5",
                    "average_price": "577.28424078",
                    "pnl_rate": "0.58426026"
                }
            ],
            "converted_pnl": "29960.0474110803944",
            "converted_profit_rate": "0.6066629",
            "top_orders": [
                {
                    "order_id": 7383381507613863936,
                    "pair": "ETH-BTC",
                    "dcp_type": 2,
                    "transaction_price": "0.03570676952045340775350355447403",
                    "current_price": "0.06",
                    "price_diff_ratio": "0.40488717465910987077494075876617"
                },
                {
                    "order_id": 7211618124117172224,
                    "pair": "ETH-BTC",
                    "dcp_type": 1,
                    "transaction_price": "0.05519101363636363636363636363636",
                    "current_price": "0.06",
                    "price_diff_ratio": "-0.08014977272727272727272727272733"
                }
            ]
        }
    },
    "message": ""
}
Parameter Name Type Description
total_cnt int Total order count
non_converted_pnl_resp object Non-converted PnL summary
non_converted_pnl_resp.non_converted_cnt int Non-converted order count
non_converted_pnl_resp.non_conversion_ratio string Non-converted ratio
non_converted_pnl_resp.non_converted_initial_principal_value string Non-converted initial principal valued in USD
non_converted_pnl_resp.cumulative_settlement string Non-converted cumulative settlement valued in USD
non_converted_pnl_resp.average_tenor string Average tenor
non_converted_pnl_resp.apy string APY
non_converted_pnl_resp.non_converted_pnl string Non-converted pnl value
non_converted_pnl_resp.non_converted_profit_rate string Non-converted profit rate
converted_pnl_resp object Converted PnL summary
converted_pnl_resp.converted_cnt int Converted order count
converted_pnl_resp.conversion_ratio string Conversion ratio
converted_pnl_resp.converted_initial_principal_value string Converted initial principal valued in USD
converted_pnl_resp.total_interest string Total interest from conversions
converted_pnl_resp.conversion_results array Conversion result items
converted_pnl_resp.conversion_results[].pair string Trading pair
converted_pnl_resp.conversion_results[].direction int Direction: 1 buy, 2 sell
converted_pnl_resp.conversion_results[].amount string Amount
converted_pnl_resp.conversion_results[].average_price string Average execution price
converted_pnl_resp.conversion_results[].pnl_rate string PnL rate
converted_pnl_resp.converted_pnl string Converted pnl value
converted_pnl_resp.converted_profit_rate string Converted profit rate
converted_pnl_resp.top_orders array Top two orders by order value
converted_pnl_resp.top_orders[].order_id int OrderID
converted_pnl_resp.top_orders[].pair string Trading pair
converted_pnl_resp.top_orders[].dcp_type int Dcp type: 1 Coin dcp, 2 USD(S) dcp
converted_pnl_resp.top_orders[].transaction_price string Transaction price
converted_pnl_resp.top_orders[].current_price string Current price
converted_pnl_resp.top_orders[].price_diff_ratio string Price difference ratio between transaction_price and current_price

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.