crypto-com-exchange

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Crypto.com Exchange Spot Skill

Crypto.com Exchange 现货交易Skill

Spot request on Crypto.com Exchange using authenticated API endpoints. Requires API key and secret key for private endpoints. Return the result in JSON format.
通过已认证的API端点在Crypto.com Exchange上进行现货交易请求。私有端点需要API密钥和密钥,返回结果为JSON格式。

Quick Reference

快速参考

EndpointMethodDescriptionRequiredOptionalAuthentication
public/get-instruments
(GET)
GETList all supported instrumentsNoneNoneNo
public/get-book
(GET)
GETOrder book for an instrumentinstrument_name, depthNoneNo
public/get-candlestick
(GET)
GETCandlestick/OHLCV datainstrument_nametimeframe, count, start_ts, end_tsNo
public/get-trades
(GET)
GETRecent public tradesinstrument_namecount, start_ts, end_tsNo
public/get-tickers
(GET)
GETTicker informationNoneinstrument_nameNo
public/get-valuations
(GET)
GETValuation data (index/mark price)instrument_name, valuation_typecount, start_ts, end_tsNo
public/get-expired-settlement-price
(GET)
GETExpired settlement pricesinstrument_typepage (must be ≥1)No
public/get-insurance
(GET)
GETInsurance fund balanceinstrument_namecount, start_ts, end_tsNo
public/get-announcements
(GET)
GETExchange announcements (base:
https://api.crypto.com/v1/
)
Nonecategory, product_typeNo
public/get-risk-parameters
(GET)
GETRisk parameters for marginNoneNoneNo
private/create-order
(POST)
POSTPlace a new orderinstrument_name, side, typeprice, quantity, notional, client_oid, exec_inst, time_in_force, spot_margin, stp_scope, stp_inst, stp_id, fee_instrument_name, isolation_id, leverage, isolated_margin_amountYes
private/create-order-list
(POST)
POSTBatch order creation (1-10, LIST only)contingency_type, order_listPer-order paramsYes
private/amend-order
(POST)
POSTModify an existing ordernew_price, new_quantityorder_id, orig_client_oid, client_oidYes
private/cancel-order
(POST)
POSTCancel a single orderorder_id or client_oidNoneYes
private/cancel-order-list
(POST)
POSTBatch cancel orderscontingency_type, order_listNoneYes
private/cancel-all-orders
(POST)
POSTCancel all ordersNoneinstrument_name, typeYes
private/close-position
(POST)
POSTClose an open positioninstrument_name, typeprice, quantity, isolation_idYes
private/get-open-orders
(POST)
POSTList ALL active open ordersNoneinstrument_nameYes
private/get-order-detail
(POST)
POSTQuery specific orderorder_id or client_oidNoneYes
private/get-order-history
(POST)
POSTHistorical ordersNoneinstrument_name, start_time, end_time, limit, isolation_idYes
private/get-trades
(POST)
POSTAccount trade listNoneinstrument_name, start_time, end_time, limit, isolation_idYes
private/get-transactions
(POST)
POSTTransaction journal (trading, settlement, funding)Noneinstrument_name, journal_type, start_time, end_time, limit, isolation_idYes
private/user-balance
(POST)
POSTCurrent wallet balancesNoneNoneYes
private/user-balance-history
(POST)
POSTHistorical balance snapshotsNonetimeframe, end_time, limitYes
private/get-accounts
(POST)
POSTMaster/sub-account infoNonepage_size, pageYes
private/get-subaccount-balances
(POST)
POSTAll sub-account balancesNoneNoneYes
private/get-positions
(POST)
POSTActive positionsNoneinstrument_nameYes
private/create-subaccount-transfer
(POST)
POSTTransfer between accountsfrom, to, currency, amountNoneYes
private/get-fee-rate
(POST)
POSTTrading fee structureNoneNoneYes
private/get-instrument-fee-rate
(POST)
POSTFee rate by instrumentinstrument_nameNoneYes
private/change-account-leverage
(POST)
POSTAdjust account leverageaccount_id, leverageNoneYes
private/change-account-settings
(POST)
POSTUpdate account settingsNonestp_scope, stp_inst, stp_id, leverageYes
private/get-account-settings
(POST)
POSTRetrieve account configNoneNoneYes
private/create-withdrawal
(POST)
POSTCreate a withdrawalcurrency, amount, addressclient_wid, address_tag, network_idYes
private/get-deposit-address
(POST)
POSTGet deposit addresscurrencyNoneYes
private/get-currency-networks
(POST)
POSTGet currency network infoNoneNoneYes
private/get-deposit-history
(POST)
POSTGet deposit historyNonecurrency, start_ts, end_ts, page_size, page, statusYes
private/get-withdrawal-history
(POST)
POSTGet withdrawal historyNonecurrency, start_ts, end_ts, page_size, page, statusYes
private/advanced/create-order
(POST)
POSTCreate trigger/stop/TP orderinstrument_name, side, type, quantityprice, ref_price, client_oid, time_in_force, exec_inst, stp_scope, stp_inst, stp_id, fee_instrument_nameYes
private/advanced/create-oco
(POST)
POSTCreate OCO order (2 orders)order_list (2 orders)Per-order paramsYes
private/advanced/cancel-oco
(POST)
POSTCancel OCO orderlist_idNoneYes
private/advanced/create-oto
(POST)
POSTCreate OTO order (2 orders)order_list (2 orders)Per-order paramsYes
private/advanced/cancel-oto
(POST)
POSTCancel OTO orderlist_idNoneYes
private/advanced/create-otoco
(POST)
POSTCreate OTOCO order (3 orders)order_list (3 orders)Per-order paramsYes
private/advanced/cancel-otoco
(POST)
POSTCancel OTOCO orderlist_idNoneYes
private/advanced/cancel-order
(POST)
POSTCancel individual OTO/OTOCO legorder_id or client_oidNoneYes
private/advanced/cancel-all-orders
(POST)
POSTCancel all advanced ordersNoneinstrument_name, typeYes
private/advanced/get-open-orders
(POST)
POSTList open advanced ordersNoneinstrument_nameYes
private/advanced/get-order-detail
(POST)
POSTQuery advanced order detailorder_id or client_oidNoneYes
private/advanced/get-order-history
(POST)
POSTAdvanced order historyNoneinstrument_name, start_time, end_time, limitYes

端点请求方法描述必填参数可选参数身份验证
public/get-instruments
(GET)
GET列出所有支持的交易标的不需要
public/get-book
(GET)
GET交易标的的订单簿instrument_name, depth不需要
public/get-candlestick
(GET)
GETK线/OHLCV数据instrument_nametimeframe, count, start_ts, end_ts不需要
public/get-trades
(GET)
GET近期公开交易记录instrument_namecount, start_ts, end_ts不需要
public/get-tickers
(GET)
GET交易标的行情信息instrument_name不需要
public/get-valuations
(GET)
GET估值数据(指数价格/标记价格)instrument_name, valuation_typecount, start_ts, end_ts不需要
public/get-expired-settlement-price
(GET)
GET到期结算价格instrument_typepage(必须≥1)不需要
public/get-insurance
(GET)
GET保险基金余额instrument_namecount, start_ts, end_ts不需要
public/get-announcements
(GET)
GET交易所公告(基础地址:
https://api.crypto.com/v1/
category, product_type不需要
public/get-risk-parameters
(GET)
GET保证金风险参数不需要
private/create-order
(POST)
POST创建新订单instrument_name, side, typeprice, quantity, notional, client_oid, exec_inst, time_in_force, spot_margin, stp_scope, stp_inst, stp_id, fee_instrument_name, isolation_id, leverage, isolated_margin_amount需要
private/create-order-list
(POST)
POST批量创建订单(1-10个,仅支持LIST类型)contingency_type, order_list单订单参数需要
private/amend-order
(POST)
POST修改现有订单new_price, new_quantityorder_id, orig_client_oid, client_oid需要
private/cancel-order
(POST)
POST取消单个订单order_id 或 client_oid需要
private/cancel-order-list
(POST)
POST批量取消订单contingency_type, order_list需要
private/cancel-all-orders
(POST)
POST取消所有订单instrument_name, type需要
private/close-position
(POST)
POST平仓instrument_name, typeprice, quantity, isolation_id需要
private/get-open-orders
(POST)
POST列出所有活跃订单instrument_name需要
private/get-order-detail
(POST)
POST查询特定订单详情order_id 或 client_oid需要
private/get-order-history
(POST)
POST历史订单记录instrument_name, start_time, end_time, limit, isolation_id需要
private/get-trades
(POST)
POST账户交易记录列表instrument_name, start_time, end_time, limit, isolation_id需要
private/get-transactions
(POST)
POST交易日志(交易、结算、资金)instrument_name, journal_type, start_time, end_time, limit, isolation_id需要
private/user-balance
(POST)
POST当前钱包余额需要
private/user-balance-history
(POST)
POST历史余额快照timeframe, end_time, limit需要
private/get-accounts
(POST)
POST主账户/子账户信息page_size, page需要
private/get-subaccount-balances
(POST)
POST所有子账户余额需要
private/get-positions
(POST)
POST活跃持仓instrument_name需要
private/create-subaccount-transfer
(POST)
POST账户间转账from, to, currency, amount需要
private/get-fee-rate
(POST)
POST交易手续费结构需要
private/get-instrument-fee-rate
(POST)
POST交易标的手续费率instrument_name需要
private/change-account-leverage
(POST)
POST调整账户杠杆account_id, leverage需要
private/change-account-settings
(POST)
POST更新账户设置stp_scope, stp_inst, stp_id, leverage需要
private/get-account-settings
(POST)
POST获取账户配置需要
private/create-withdrawal
(POST)
POST创建提现请求currency, amount, addressclient_wid, address_tag, network_id需要
private/get-deposit-address
(POST)
POST获取充值地址currency需要
private/get-currency-networks
(POST)
POST获取币种网络信息需要
private/get-deposit-history
(POST)
POST获取充值历史currency, start_ts, end_ts, page_size, page, status需要
private/get-withdrawal-history
(POST)
POST获取提现历史currency, start_ts, end_ts, page_size, page, status需要
private/advanced/create-order
(POST)
POST创建触发/止损/止盈订单instrument_name, side, type, quantityprice, ref_price, client_oid, time_in_force, exec_inst, stp_scope, stp_inst, stp_id, fee_instrument_name需要
private/advanced/create-oco
(POST)
POST创建OCO订单(2个订单)order_list(2个订单)单订单参数需要
private/advanced/cancel-oco
(POST)
POST取消OCO订单list_id需要
private/advanced/create-oto
(POST)
POST创建OTO订单(2个订单)order_list(2个订单)单订单参数需要
private/advanced/cancel-oto
(POST)
POST取消OTO订单list_id需要
private/advanced/create-otoco
(POST)
POST创建OTOCO订单(3个订单)order_list(3个订单)单订单参数需要
private/advanced/cancel-otoco
(POST)
POST取消OTOCO订单list_id需要
private/advanced/cancel-order
(POST)
POST取消OTO/OTOCO订单的单个子订单order_id 或 client_oid需要
private/advanced/cancel-all-orders
(POST)
POST取消所有高级订单instrument_name, type需要
private/advanced/get-open-orders
(POST)
POST列出所有未成交的高级订单instrument_name需要
private/advanced/get-order-detail
(POST)
POST查询高级订单详情order_id 或 client_oid需要
private/advanced/get-order-history
(POST)
POST高级订单历史记录instrument_name, start_time, end_time, limit需要

Parameters

参数说明

Common Parameters

通用参数

  • instrument_name: Instrument name. Spot pairs use underscore format (e.g.,
    BTC_USD
    ,
    ETH_USDT
    ,
    CRO_USD
    ). Case-sensitive
    btc_usd
    will not work
  • side: Order side —
    BUY
    or
    SELL
  • type: Order type —
    LIMIT
    or
    MARKET
  • quantity: Order quantity (string, e.g.,
    "0.01"
    )
  • notional: Order value in quote currency (for MARKET BUY orders, use instead of quantity)
  • price: Limit price (string, required for LIMIT orders, e.g.,
    "50000.00"
    )
  • client_oid: Optional client-assigned order ID (max 36 characters)
  • time_in_force: Order duration policy
  • exec_inst: Execution instructions (array)
  • stp_scope: Self-trade prevention scope
  • stp_inst: Self-trade prevention instruction
  • stp_id: Self-trade prevention ID (0 to 32767)
  • fee_instrument_name: Instrument to use for fee payment
  • spot_margin:
    SPOT
    (default) or
    MARGIN
  • isolation_id: Isolated margin position ID
  • leverage: Leverage multiplier
  • isolated_margin_amount: Amount for isolated margin
  • depth: Order book depth. Must be ≥1 (e.g., 10, 50, 150). No hard upper limit — returns available levels
  • timeframe: Candlestick interval
  • count: Number of results to return. Max: 300 for candlestick, 150 for public trades. Min: 1 (0 → error 40004)
  • start_ts: Start timestamp in Unix ms (used for public endpoints and wallet history)
  • end_ts: End timestamp in Unix ms (used for public endpoints and wallet history)
  • start_time: Start time in Unix time format, inclusive (used for trading history endpoints —
    get-order-history
    ,
    get-trades
    ,
    get-transactions
    ). Nanosecond recommended for accurate pagination
  • end_time: End time in Unix time format, exclusive (used for trading history endpoints). Nanosecond recommended for accurate pagination
  • limit: Maximum number of records. Default: 100. Max: 100 (for trading history endpoints)
  • page_size: Results per page. Default: 20. Max: 200. Only works on wallet history endpoints (
    get-deposit-history
    ,
    get-withdrawal-history
    ). Ignored on trading endpoints (
    get-order-history
    ,
    get-trades
    ,
    get-open-orders
    ) — use
    limit
    instead
  • page: Page number (0-based)
  • new_price: New price for amend-order (required, must always be provided even if unchanged)
  • new_quantity: New quantity for amend-order (required, must always be provided even if unchanged)
  • orig_client_oid: Original client order ID for amend-order (alternative to order_id)
  • ref_price: Trigger/reference price for advanced orders (used with STOP_LOSS, STOP_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT)
  • ref_price_type: Reference price type — only
    MARK_PRICE
    supported for OCO/OTO/OTOCO trigger legs
  • contingency_type:
    LIST
    for batch orders via
    create-order-list
    (OCO/OTO/OTOCO are NOT supported on this endpoint — returns 140001 API_DISABLED). Use
    private/advanced/create-oco
    ,
    create-oto
    ,
    create-otoco
    instead
  • order_list: Array of order objects for batch/advanced order creation
  • list_id: ID for OCO/OTO/OTOCO order groups (returned on creation, used for cancellation)
  • leg_id: Leg identifier within OTO/OTOCO (1, 2, or 3)
  • instrument_name:交易标的名称。现货交易对使用下划线格式(如
    BTC_USD
    ETH_USDT
    CRO_USD
    )。区分大小写——
    btc_usd
    无法生效
  • side:订单方向——
    BUY
    (买入)或
    SELL
    (卖出)
  • type:订单类型——
    LIMIT
    (限价单)或
    MARKET
    (市价单)
  • quantity:订单数量(字符串格式,如
    "0.01"
  • notional:订单总价值(以计价币种计算,市价买入订单需使用该参数,而非quantity)
  • price:限价价格(字符串格式,限价单必填,如
    "50000.00"
  • client_oid:可选的客户端自定义订单ID(最多36个字符)
  • time_in_force:订单有效期策略
  • exec_inst:执行指令(数组格式)
  • stp_scope:自成交防护范围
  • stp_inst:自成交防护指令
  • stp_id:自成交防护ID(0至32767)
  • fee_instrument_name:用于支付手续费的交易标的
  • spot_margin
    SPOT
    (现货,默认)或
    MARGIN
    (保证金)
  • isolation_id:逐仓保证金持仓ID
  • leverage:杠杆倍数
  • isolated_margin_amount:逐仓保证金金额
  • depth:订单簿深度,必须≥1(如10、50、150),无硬性上限,返回可用的档位数据
  • timeframe:K线时间周期
  • count:返回结果数量上限,K线最多300条,公开交易记录最多150条,最小值为1(传入0会返回错误40004)
  • start_ts:起始时间戳(毫秒级Unix时间,用于公开端点和钱包历史接口)
  • end_ts:结束时间戳(毫秒级Unix时间,用于公开端点和钱包历史接口)
  • start_time:起始时间(Unix时间格式,包含该时间,用于交易历史接口——
    get-order-history
    get-trades
    get-transactions
    ),推荐使用纳秒级以确保分页准确性
  • end_time:结束时间(Unix时间格式,不包含该时间,用于交易历史接口),推荐使用纳秒级以确保分页准确性
  • limit:最大记录数,默认100,最大值100(用于交易历史接口)
  • page_size:每页结果数量,默认20,最大值200。仅适用于钱包历史接口
    get-deposit-history
    get-withdrawal-history
    ),交易接口(
    get-order-history
    get-trades
    get-open-orders
    )会忽略该参数,请使用
    limit
    替代
  • page:页码(从0开始)
  • new_price:修改订单的新价格(必填,即使价格未变更也必须提供)
  • new_quantity:修改订单的新数量(必填,即使数量未变更也必须提供)
  • orig_client_oid:原客户端订单ID(用于修改订单,替代order_id)
  • ref_price:高级订单的触发/参考价格(用于STOP_LOSS、STOP_LIMIT、TAKE_PROFIT、TAKE_PROFIT_LIMIT类型)
  • ref_price_type:参考价格类型——OCO/OTO/OTOCO触发订单仅支持
    MARK_PRICE
  • contingency_type
    create-order-list
    接口的批量订单类型(仅支持LIST,OCO/OTO/OTOCO不支持该接口,会返回错误140001 API_DISABLED),请使用
    private/advanced/create-oco
    create-oto
    create-otoco
    接口替代
  • order_list:批量/高级订单创建的订单对象数组
  • list_id:OCO/OTO/OTOCO订单组ID(创建时返回,用于取消操作)
  • leg_id:OTO/OTOCO订单的子订单标识(1、2或3)

Wallet Parameters

钱包参数

  • currency: Currency symbol (e.g.,
    BTC
    ,
    CRO
    ,
    USDT
    )
  • amount: Amount as string (e.g.,
    "1"
    )
  • address: Withdrawal destination address
  • address_tag: Secondary address identifier for coins like XRP, XLM (also known as memo or tag)
  • network_id: Desired network for withdrawal. Must be whitelisted first. See
    get-currency-networks
    for values
  • client_wid: Optional client withdrawal ID
  • status: Filter by status. Deposit:
    0
    (Not Arrived),
    1
    (Arrived),
    2
    (Failed),
    3
    (Pending). Withdrawal:
    0
    (Pending),
    1
    (Processing),
    2
    (Rejected),
    3
    (Payment In-progress),
    4
    (Payment Failed),
    5
    (Completed),
    6
    (Cancelled)
  • journal_type: Transaction journal type filter. Values:
    TRADING
    ,
    SESSION_SETTLE
    ,
    FUNDING
    , etc.
  • currency:币种符号(如
    BTC
    CRO
    USDT
  • amount:金额(字符串格式,如
    "1"
  • address:提现目标地址
  • address_tag:XRP、XLM等币种的二级地址标识(也称为memo或tag)
  • network_id:提现的目标网络,必须先在白名单中设置,可通过
    get-currency-networks
    接口查询可用值
  • client_wid:可选的客户端自定义提现ID
  • status:按状态过滤。充值:
    0
    (未到账)、
    1
    (已到账)、
    2
    (失败)、
    3
    (处理中);提现:
    0
    (待处理)、
    1
    (处理中)、
    2
    (已拒绝)、
    3
    (支付中)、
    4
    (支付失败)、
    5
    (已完成)、
    6
    (已取消)
  • journal_type:交易日志类型过滤,可选值:
    TRADING
    SESSION_SETTLE
    FUNDING

Request Envelope Parameters (all requests)

请求信封参数(所有请求)

  • id: Request identifier (integer, 0 to 9,223,372,036,854,775,807)
  • method: API endpoint name (e.g.,
    "private/create-order"
    )
  • nonce: Current timestamp in milliseconds
  • params: Parameters object (can be empty
    {}
    )
  • api_key: Your API key (private methods only)
  • sig: Digital signature (private methods only)
  • id:请求标识(整数,0至9,223,372,036,854,775,807)
  • method:API端点名称(如
    "private/create-order"
  • nonce:当前时间戳(毫秒级)
  • params:参数对象(可传入空对象
    {}
  • api_key:你的API密钥(仅私有方法需要)
  • sig:数字签名(仅私有方法需要)

Enums

枚举值

  • type (order): LIMIT | MARKET
  • side: BUY | SELL
  • time_in_force: GOOD_TILL_CANCEL | IMMEDIATE_OR_CANCEL | FILL_OR_KILL
  • exec_inst: POST_ONLY | SMART_POST_ONLY | ISOLATED_MARGIN (array, POST_ONLY and SMART_POST_ONLY cannot coexist)
  • stp_scope: M (master or sub account) | S (sub account only)
  • stp_inst: M (cancel maker) | T (cancel taker) | B (cancel both)
  • spot_margin: SPOT | MARGIN
  • timeframe (candlestick): 1m | 5m | 15m | 30m | 1h | 2h | 4h | 6h | 12h | 1D | 7D | 14D | 1M (legacy formats also accepted: M1, M5, M15, M30, H1, H2, H4, H12, D1, D7, D14)
  • instrument_type: PERPETUAL_SWAP | FUTURE
  • valuation_type: INDEX_PRICE | MARK_PRICE (context-dependent)
  • contingency_type: LIST (batch) | OTO | OTOCO (in responses)
  • type (advanced order): STOP_LOSS | STOP_LIMIT | TAKE_PROFIT | TAKE_PROFIT_LIMIT
  • ref_price_type: MARK_PRICE
  • order status (advanced open): NEW | PENDING | ACTIVE
  • order status (advanced history): REJECTED | CANCELED | FILLED | EXPIRED
  • type(订单):LIMIT | MARKET
  • side:BUY | SELL
  • time_in_force:GOOD_TILL_CANCEL | IMMEDIATE_OR_CANCEL | FILL_OR_KILL
  • exec_inst:POST_ONLY | SMART_POST_ONLY(两者不能同时存在)
  • stp_scope:M(主账户/子账户)| S(仅子账户)
  • stp_inst:M(取消 maker 订单)| T(取消 taker 订单)| B(取消双方订单)
  • spot_margin:SPOT | MARGIN
  • timeframe(K线):1m | 5m | 15m | 30m | 1h | 2h | 4h | 6h | 12h | 1D | 7D | 14D | 1M(也支持旧格式:M1, M5, M15, M30, H1, H2, H4, H12, D1, D7, D14)
  • instrument_type:PERPETUAL_SWAP | FUTURE
  • valuation_type:INDEX_PRICE | MARK_PRICE(根据上下文选择)
  • contingency_type:LIST(批量)| OTO | OTOCO(用于响应结果)
  • type(高级订单):STOP_LOSS | STOP_LIMIT | TAKE_PROFIT | TAKE_PROFIT_LIMIT
  • ref_price_type:MARK_PRICE
  • order status(未成交高级订单):NEW | PENDING | ACTIVE
  • order status(历史高级订单):REJECTED | CANCELED | FILLED | EXPIRED

Important Notes

重要注意事项

  • Must be strings:
    price
    ,
    quantity
    ,
    notional
    ,
    ref_price
    ,
    amount
    ,
    new_price
    ,
    new_quantity
    — order/amount params must be strings (e.g.,
    "0.01"
    not
    0.01
    ). Sending as number returns errors:
    price
    → 308,
    quantity
    → 40101,
    notional
    → 50001,
    ref_price
    → 229
  • Must be numbers:
    limit
    ,
    end_time
    (on
    user-balance-history
    ) — must be integers. Sending
    limit
    as string returns error 40003 on
    get-order-history
    ,
    get-trades
    ,
    get-transactions
    ,
    user-balance-history
    ,
    advanced/get-order-history
  • Accept both:
    page
    ,
    page_size
    ,
    count
    ,
    depth
    ,
    start_time
    ,
    end_time
    (on trading history),
    start_ts
    ,
    end_ts
  • 必须为字符串
    price
    quantity
    notional
    ref_price
    amount
    new_price
    new_quantity
    ——订单/金额参数必须为字符串格式(如
    "0.01"
    而非
    0.01
    )。如果传入数字会返回错误:
    price
    →308、
    quantity
    →40101、
    notional
    →50001、
    ref_price
    →229
  • 必须为数字
    limit
    end_time
    user-balance-history
    接口)——必须为整数。如果
    limit
    传入字符串,在
    get-order-history
    get-trades
    get-transactions
    user-balance-history
    advanced/get-order-history
    接口会返回错误40003
  • 两种格式都支持
    page
    page_size
    count
    depth
    start_time
    (交易历史接口)、
    end_time
    (交易历史接口)、
    start_ts
    end_ts

Production Validation Notes

生产环境验证注意事项

  • FAR_AWAY_LIMIT_PRICE (315): Limit orders with prices too far from market are rejected (e.g., BUY BTC @ $1 or SELL BTC @ $999,999). Keep limit prices within a reasonable range of current market price
  • Expired settlement page:
    public/get-expired-settlement-price
    requires
    page >= 1
    . Sending
    page=0
    returns error 40004. Omitting
    page
    entirely works (returns first page)
  • Withdrawal whitelist:
    private/create-withdrawal
    requires the destination address to be whitelisted in your Exchange withdrawal settings (not App). Non-whitelisted addresses return error 5000811 (WITHDRAW_ADDRESS_NOT_IN_WHITE_LIST)
  • Withdrawal amount is gross:
    amount
    includes the fee. If you send
    amount: "11"
    and the network fee is 1, the recipient gets 10. The response shows
    amount: 10
    and
    fee: 1
  • Withdrawal network_id: For multi-chain tokens (USDC, USDT, etc.), always specify
    network_id
    . Without it, the API may reject or pick an unexpected default chain
  • MARKET order + price: MARKET orders ignore
    price
    if provided (no error). For MARKET BUY, use
    notional
    . For MARKET SELL, use
    quantity
  • POST_ONLY on MARKET: Returns error 43005 (POST_ONLY_REJ). POST_ONLY only works with LIMIT orders
  • FOK/IOC on far-from-market LIMIT:
    FILL_OR_KILL
    and
    IMMEDIATE_OR_CANCEL
    on limit orders far from market will immediately reject (43003/43004) since they can't fill
  • amend-order requires both: Both
    new_price
    AND
    new_quantity
    must always be provided (even if one is unchanged). Omitting either returns 40004
  • Batch order max:
    create-order-list
    accepts maximum 10 orders. 11+ returns 40004
  • HTTP methods are strict: Public endpoints accept GET only (POST → 50001). Private endpoints accept POST only (GET → 40003)
  • Amend cancelled/filled order: Returns 212 (INVALID_ORDERID). Can only amend ACTIVE orders
  • Unknown params are silently ignored: Extra/unknown keys in
    params
    don't cause errors
  • Inverted time range:
    start_time
    >
    end_time
    does NOT error — the API appears to ignore ordering and returns data anyway
  • cancel-all-orders scopes by instrument: Only cancels orders for the specified
    instrument_name
    . Other instruments' orders are untouched
  • Multiple STOP orders on same instrument: Allowed — no limit on concurrent trigger orders per instrument
  • OTO second leg must be trigger order: The contingent (second) leg of an OTO must be STOP_LOSS, STOP_LIMIT, TAKE_PROFIT, or TAKE_PROFIT_LIMIT — not a plain LIMIT. Using LIMIT for the second leg returns 40004
  • OTOCO structure: Leg 1 = primary LIMIT order, Leg 2 = take-profit trigger, Leg 3 = stop-loss trigger. Legs 2 and 3 must be trigger order types
  • MARKET BUY with both notional + quantity:
    quantity
    takes priority over
    notional
    . If the quantity is below minimum, you get error 415 even if notional would be valid
  • get-open-orders has NO pagination:
    page
    ,
    page_size
    ,
    count
    , and
    limit
    params are all ignored — returns ALL open orders regardless
  • get-order-history/get-trades pagination:
    limit
    works correctly.
    page
    /
    page_size
    are ignored (always returns up to
    limit
    , default 100). Use
    start_time
    /
    end_time
    for windowed queries
  • Nonce accepts int or string — float is rejected (40101).
    id
    must be a number (string → 40001)
  • Candlestick count max 300: Requesting more silently caps at 300.
    count=0
    returns 40004. Min is 1
  • Public trades count max 150: Requesting more silently caps at 150
  • get-instruments has no server-side filtering:
    inst_type
    ,
    currency
    , and other filter params are ignored — always returns ALL instruments (852+). Filter client-side
  • order_id format: Always a numeric string (e.g.,
    "6530219599901000701"
    ). Returned as string, accepted as string or number
  • spot_margin values: Only
    "SPOT"
    or
    "MARGIN"
    are valid. Invalid values → 50001.
    "MARGIN"
    requires margin access (error 416 without it)
  • get-valuations requires both params: Must provide
    instrument_name
    AND
    valuation_type
    (only
    mark_price
    works for spot pairs;
    index_price
    → 40004). Without
    valuation_type
    → 40003
  • get-insurance requires instrument_name: Not optional — omitting returns 40003
  • Candlestick valid timeframes:
    1m
    ,
    5m
    ,
    15m
    ,
    30m
    ,
    1h
    ,
    2h
    ,
    4h
    ,
    6h
    ,
    12h
    ,
    1D
    ,
    7D
    ,
    14D
    ,
    1M
    . Legacy format also works:
    M1
    ,
    M5
    ,
    M15
    ,
    M30
    ,
    H1
    ,
    H2
    ,
    H4
    ,
    H12
    ,
    D1
    ,
    D7
    ,
    D14
    . Invalid timeframes (e.g.,
    2m
    ,
    8h
    ,
    3D
    ) return 40003
  • Trading history endpoints (
    get-order-history
    ,
    get-trades
    ,
    get-transactions
    ) use
    start_time
    /
    end_time
    with nanosecond precision recommended
  • Wallet history endpoints (
    get-deposit-history
    ,
    get-withdrawal-history
    ) use
    start_ts
    /
    end_ts
    in milliseconds
  • notional
    is used instead of
    quantity
    for MARKET BUY orders (specifies spend amount in quote currency)
  • For MARKET SELL orders, use
    quantity
    (amount of base currency to sell)
  • If you omit all parameters, you still need to pass an empty params block
    params: {}
    for API request consistency

  • FAR_AWAY_LIMIT_PRICE (315):限价价格与市场价格偏差过大的限价单会被拒绝(如以1美元买入BTC或以999,999美元卖出BTC),请确保限价价格在当前市场价格的合理范围内
  • 到期结算价格分页
    public/get-expired-settlement-price
    接口要求
    page >=1
    ,传入
    page=0
    会返回错误40004,省略
    page
    参数会返回第一页数据
  • 提现白名单
    private/create-withdrawal
    接口要求目标地址已在你的交易所提现设置中加入白名单(而非App),未加入白名单的地址会返回错误5000811(WITHDRAW_ADDRESS_NOT_IN_WHITE_LIST)
  • 提现金额为总额
    amount
    包含手续费。如果传入
    amount: "11"
    且网络手续费为1,收款人将收到10,响应结果会显示
    amount: 10
    fee: 1
  • 提现network_id:对于多链代币(如USDC、USDT等),请务必指定
    network_id
    ,否则API可能会拒绝请求或选择非预期的默认链
  • 市价单+price参数:市价单会忽略传入的
    price
    参数(不会返回错误)。市价买入请使用
    notional
    参数,市价卖出请使用
    quantity
    参数
  • 市价单使用POST_ONLY:会返回错误43005(POST_ONLY_REJ),POST_ONLY仅适用于限价单
  • 偏离市场价格的限价单使用FOK/IOC:与市场价格偏差过大的限价单使用FILL_OR_KILL或IMMEDIATE_OR_CANCEL会立即被拒绝(43003/43004),因为无法成交
  • 修改订单需同时提供两个参数:必须同时提供
    new_price
    new_quantity
    (即使其中一个未变更),省略任意一个会返回错误40004
  • 批量订单数量上限
    create-order-list
    接口最多支持10个订单,传入11个及以上会返回错误40004
  • HTTP方法严格限制:公开端点仅接受GET请求(POST请求会返回错误50001),私有端点仅接受POST请求(GET请求会返回错误40003)
  • 修改已取消/已成交订单:会返回错误212(INVALID_ORDERID),仅能修改活跃订单
  • 未知参数会被静默忽略
    params
    中的多余/未知参数不会导致错误
  • 时间范围倒置
    start_time > end_time
    不会返回错误,API会忽略顺序并返回数据
  • 取消所有订单按交易标的过滤:仅会取消指定
    instrument_name
    的订单,其他交易标的的订单不受影响
  • 同一交易标的允许多个止损订单:同一交易标的的并发触发订单数量无限制
  • OTO订单的第二个子订单必须为触发订单:OTO订单的附属子订单必须为STOP_LOSS、STOP_LIMIT、TAKE_PROFIT或TAKE_PROFIT_LIMIT类型,不能为普通限价单,否则会返回错误40004
  • OTOCO订单结构:子订单1=主限价单,子订单2=止盈触发订单,子订单3=止损触发订单,子订单2和3必须与主订单方向相反
  • 市价买入同时传入notional和quantity
    quantity
    优先级高于
    notional
    ,如果quantity低于最小要求,即使notional符合要求也会返回错误415
  • get-open-orders接口无分页
    page
    page_size
    count
    limit
    参数都会被忽略,会返回所有未成交订单
  • get-order-history/get-trades分页
    limit
    参数生效,
    page
    /
    page_size
    参数会被忽略(最多返回
    limit
    条数据,默认100),请使用
    start_time
    /
    end_time
    进行时间范围查询
  • Nonce支持整数或字符串——传入浮点数会被拒绝(40101),
    id
    必须为数字(传入字符串会返回错误40001)
  • K线count最大值300:请求超过300条会自动截断为300条,
    count=0
    会返回错误40004,最小值为1
  • 公开交易记录count最大值150:请求超过150条会自动截断为150条
  • get-instruments接口无服务端过滤
    inst_type
    currency
    等过滤参数会被忽略,会返回所有交易标的(852+个),请在客户端进行过滤
  • order_id格式:始终为数字字符串(如
    "6530219599901000701"
    ),响应结果中为字符串格式,请求时可传入字符串或数字
  • spot_margin有效值:仅
    "SPOT"
    "MARGIN"
    有效,传入无效值会返回错误50001,
    "MARGIN"
    需要开通保证金权限(未开通会返回错误416)
  • get-valuations接口需同时提供两个参数:必须提供
    instrument_name
    valuation_type
    (现货交易对仅支持
    mark_price
    ,传入
    index_price
    会返回错误40004),省略
    valuation_type
    会返回错误40003
  • get-insurance接口需要instrument_name:该参数为必填,省略会返回错误40003
  • K线有效时间周期
    1m
    5m
    15m
    30m
    1h
    2h
    4h
    6h
    12h
    1D
    7D
    14D
    1M
    ,也支持旧格式:
    M1
    M5
    M15
    M30
    H1
    H2
    H4
    H12
    D1
    D7
    D14
    ,传入无效时间周期(如
    2m
    8h
    3D
    )会返回错误40003
  • 交易历史接口(
    get-order-history
    get-trades
    get-transactions
    )使用
    start_time
    /
    end_time
    ,推荐使用纳秒级精度
  • 钱包历史接口(
    get-deposit-history
    get-withdrawal-history
    )使用
    start_ts
    /
    end_ts
    (毫秒级)
  • 市价买入订单使用
    notional
    参数(指定计价币种的花费金额)
  • 市价卖出订单使用
    quantity
    参数(指定基础币种的卖出数量)
  • 如果省略所有参数,仍需传入空参数对象
    params: {}
    以保证API请求格式一致

Advanced Order Management API

高级订单管理API

Advanced order types (trigger orders, OCO, OTO, OTOCO) are managed through the
private/advanced/*
endpoints. These are Spot-only for now.
高级订单类型(触发订单、OCO、OTO、OTOCO)通过
private/advanced/*
端点管理,目前仅支持现货交易。

private/advanced/create-order

private/advanced/create-order

Creates a trigger order (STOP_LOSS, STOP_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT).
  • STOP_LIMIT
    and
    TAKE_PROFIT_LIMIT
    execute a LIMIT order when
    ref_price
    is reached
  • STOP_LOSS
    and
    TAKE_PROFIT
    execute a MARKET order when
    ref_price
    is reached
Trigger direction:
  • ref_price
    below market: SELL STOP_LOSS/STOP_LIMIT, BUY TAKE_PROFIT/TAKE_PROFIT_LIMIT
  • ref_price
    above market: BUY STOP_LOSS/STOP_LIMIT, SELL TAKE_PROFIT/TAKE_PROFIT_LIMIT
ParamTypeRequiredDescription
instrument_namestringYe.g., BTC_USD
sidestringYBUY, SELL
typestringYSTOP_LOSS, STOP_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT
pricestringDependsFor STOP_LIMIT and TAKE_PROFIT_LIMIT only: limit price (e.g.,
"0.12"
)
quantitystringYOrder quantity (e.g.,
"10"
)
ref_pricestringNTrigger price (e.g.,
"0.12"
)
client_oidstringNClient order ID (max 36 chars)
time_in_forcestringNGOOD_TILL_CANCEL (default), FILL_OR_KILL, IMMEDIATE_OR_CANCEL
exec_instarrayNPOST_ONLY, SMART_POST_ONLY (cannot coexist)
stp_scopestringNM (master/sub) or S (sub only)
stp_inststringN*M (cancel maker), T (cancel taker), B (cancel both). Required if stp_scope is set
stp_idstringN0 to 32767
fee_instrument_namestringNPreferred fee token
json
{
  "id": 6573,
  "method": "private/advanced/create-order",
  "params": {
    "instrument_name": "CRO_USD",
    "side": "SELL",
    "type": "STOP_LIMIT",
    "quantity": "10",
    "price": "0.12",
    "ref_price": "0.12",
    "client_oid": "c5f682ed-7108-4f1c-b755-972fcdca0f02"
  }
}
Response:
{ "order_id": "5755600460443882762", "client_oid": "..." }
创建触发订单(STOP_LOSS、STOP_LIMIT、TAKE_PROFIT、TAKE_PROFIT_LIMIT)。
  • STOP_LIMIT
    TAKE_PROFIT_LIMIT
    :当
    ref_price
    达到时,执行限价单
  • STOP_LOSS
    TAKE_PROFIT
    :当
    ref_price
    达到时,执行市价单
触发方向:
  • ref_price
    低于市场价格:卖出STOP_LOSS/STOP_LIMIT,买入TAKE_PROFIT/TAKE_PROFIT_LIMIT
  • ref_price
    高于市场价格:买入STOP_LOSS/STOP_LIMIT,卖出TAKE_PROFIT/TAKE_PROFIT_LIMIT
参数类型必填描述
instrument_namestring如BTC_USD
sidestringBUY、SELL
typestringSTOP_LOSS、STOP_LIMIT、TAKE_PROFIT、TAKE_PROFIT_LIMIT
pricestring可选仅STOP_LIMIT和TAKE_PROFIT_LIMIT类型需要:限价价格(如
"0.12"
quantitystring订单数量(如
"10"
ref_pricestring触发价格(如
"0.12"
client_oidstring客户端订单ID(最多36个字符)
time_in_forcestringGOOD_TILL_CANCEL(默认)、FILL_OR_KILL、IMMEDIATE_OR_CANCEL
exec_instarrayPOST_ONLY、SMART_POST_ONLY(两者不能同时存在)
stp_scopestringM(主账户/子账户)或S(仅子账户)
stp_inststring可选*M(取消maker订单)、T(取消taker订单)、B(取消双方订单),设置stp_scope时必填
stp_idstring0至32767
fee_instrument_namestring优先使用的手续费代币
json
{
  "id": 6573,
  "method": "private/advanced/create-order",
  "params": {
    "instrument_name": "CRO_USD",
    "side": "SELL",
    "type": "STOP_LIMIT",
    "quantity": "10",
    "price": "0.12",
    "ref_price": "0.12",
    "client_oid": "c5f682ed-7108-4f1c-b755-972fcdca0f02"
  }
}
响应结果:
{ "order_id": "5755600460443882762", "client_oid": "..." }

private/advanced/create-oco

private/advanced/create-oco

Creates a One-Cancels-the-Other order. When one leg is partially/fully executed, the other is automatically canceled. Exactly 2 orders required: one LIMIT + one trigger (STOP_LOSS, STOP_LIMIT, TAKE_PROFIT, or TAKE_PROFIT_LIMIT).
ParamTypeRequiredDescription
order_listarrayYExactly 2 orders. One must be LIMIT, other must be a trigger type
Each order in
order_list
follows
private/create-order
params. For
ref_price_type
of the trigger order, only
MARK_PRICE
is supported.
json
{
  "method": "private/advanced/create-oco",
  "id": 123456789,
  "nonce": 123456789000,
  "params": {
    "order_list": [
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "LIMIT",
        "price": "93000",
        "side": "SELL"
      },
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "STOP_LOSS",
        "ref_price": "80000",
        "side": "SELL"
      }
    ]
  }
}
Response:
{ "list_id": 6498090546073120100 }
创建OCO(一损一盈)订单,当其中一个子订单部分/完全成交时,另一个子订单会自动取消。必须包含2个订单:一个限价单和一个触发订单(STOP_LOSS、STOP_LIMIT、TAKE_PROFIT或TAKE_PROFIT_LIMIT)。
参数类型必填描述
order_listarray必须包含2个订单,一个为限价单,另一个为触发订单
order_list
中的每个订单遵循
private/create-order
的参数格式,触发订单的
ref_price_type
仅支持
MARK_PRICE
json
{
  "method": "private/advanced/create-oco",
  "id": 123456789,
  "nonce": 123456789000,
  "params": {
    "order_list": [
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "LIMIT",
        "price": "93000",
        "side": "SELL"
      },
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "STOP_LOSS",
        "ref_price": "80000",
        "side": "SELL"
      }
    ]
  }
}
响应结果:
{ "list_id": 6498090546073120100 }

private/advanced/create-oto

private/advanced/create-oto

Creates a One-Triggers-the-Other order. When the first order (LIMIT) is fully executed, the second order (trigger) takes effect. Exactly 2 orders required. The trigger order must be on the opposite side of the working LIMIT order (e.g., BUY LIMIT + SELL STOP_LOSS, or SELL LIMIT + BUY STOP_LOSS).
ParamTypeRequiredDescription
order_listarrayYExactly 2 orders. One LIMIT + one trigger type. Trigger must be opposite side
json
{
  "method": "private/advanced/create-oto",
  "id": 123456789,
  "nonce": 123456789000,
  "params": {
    "order_list": [
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "LIMIT",
        "price": "93000",
        "side": "BUY"
      },
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "STOP_LOSS",
        "ref_price": "80000",
        "side": "SELL"
      }
    ]
  }
}
Response:
{ "list_id": 6498090546073120100 }
创建OTO(触发后生效)订单,当第一个订单(限价单)完全成交时,第二个订单(触发订单)生效。必须包含2个订单,触发订单必须与主限价单方向相反(如买入限价单+卖出止损单,或卖出限价单+买入止损单)。
参数类型必填描述
order_listarray必须包含2个订单,一个为限价单,一个为触发订单,触发订单必须与主订单方向相反
json
{
  "method": "private/advanced/create-oto",
  "id": 123456789,
  "nonce": 123456789000,
  "params": {
    "order_list": [
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "LIMIT",
        "price": "93000",
        "side": "BUY"
      },
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "STOP_LOSS",
        "ref_price": "80000",
        "side": "SELL"
      }
    ]
  }
}
响应结果:
{ "list_id": 6498090546073120100 }

private/advanced/create-otoco

private/advanced/create-otoco

Creates a One-Triggers-a-One-Cancels-the-Other order. When the first LIMIT order is fully executed, two trigger orders take effect. When either trigger executes, the other is canceled. Exactly 3 orders required: one LIMIT + one STOP_LOSS/STOP_LIMIT + one TAKE_PROFIT/TAKE_PROFIT_LIMIT. The trigger orders must be on the opposite side of the working LIMIT order.
ParamTypeRequiredDescription
order_listarrayYExactly 3 orders. One LIMIT + one stop + one take-profit. Triggers must be opposite side
json
{
  "method": "private/advanced/create-otoco",
  "id": 123456789,
  "nonce": 123456789000,
  "params": {
    "order_list": [
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "LIMIT",
        "price": "93000",
        "side": "BUY"
      },
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "STOP_LOSS",
        "ref_price": "80000",
        "side": "SELL"
      },
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "TAKE_PROFIT",
        "ref_price": "108000",
        "side": "SELL"
      }
    ]
  }
}
Response:
{ "list_id": 6498090546073120100 }
创建OTOCO(触发后启用一损一盈)订单,当第一个限价单完全成交时,两个触发订单生效,当其中一个触发订单成交时,另一个会自动取消。必须包含3个订单:一个限价单+一个止损触发订单+一个止盈触发订单,触发订单必须与主限价单方向相反。
参数类型必填描述
order_listarray必须包含3个订单,一个为限价单,一个为止损订单,一个为止盈订单,触发订单必须与主订单方向相反
json
{
  "method": "private/advanced/create-otoco",
  "id": 123456789,
  "nonce": 123456789000,
  "params": {
    "order_list": [
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "LIMIT",
        "price": "93000",
        "side": "BUY"
      },
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "STOP_LOSS",
        "ref_price": "80000",
        "side": "SELL"
      },
      {
        "instrument_name": "BTC_USD",
        "quantity": "0.1",
        "type": "TAKE_PROFIT",
        "ref_price": "108000",
        "side": "SELL"
      }
    ]
  }
}
响应结果:
{ "list_id": 6498090546073120100 }

private/advanced/cancel-oco, cancel-oto, cancel-otoco

private/advanced/cancel-oco, cancel-oto, cancel-otoco

Cancel an OCO/OTO/OTOCO order group.
ParamTypeRequiredDescription
list_idstringYList ID returned from create
json
{ "method": "private/advanced/cancel-oco", "id": 1234, "nonce": 123456789000, "params": { "list_id": "4421958062479290999" } }
取消OCO/OTO/OTOCO订单组。
参数类型必填描述
list_idstring创建订单时返回的List ID
json
{ "method": "private/advanced/cancel-oco", "id": 1234, "nonce": 123456789000, "params": { "list_id": "4421958062479290999" } }

private/advanced/cancel-order

private/advanced/cancel-order

Cancel an individual leg of an OTO/OTOCO order.
ParamTypeRequiredDescription
order_idnumber or stringDependsEither order_id or client_oid must be present. String format recommended
client_oidstringDependsEither order_id or client_oid must be present
取消OTO/OTOCO订单的单个子订单。
参数类型必填描述
order_idnumber 或 string可选必须提供order_id或client_oid,推荐使用字符串格式
client_oidstring可选必须提供order_id或client_oid

private/advanced/cancel-all-orders

private/advanced/cancel-all-orders

Cancel all advanced orders for an instrument.
ParamTypeRequiredDescription
instrument_namestringNe.g., BTC_USD. Omit to cancel ALL instruments
typestringNLIMIT, TRIGGER, or ALL
取消指定交易标的的所有高级订单。
参数类型必填描述
instrument_namestring如BTC_USD,省略则取消所有交易标的的高级订单
typestringLIMIT、TRIGGER或ALL

private/advanced/get-open-orders

private/advanced/get-open-orders

Get all open advanced orders.
ParamTypeRequiredDescription
instrument_namestringNe.g., BTC_USD. Omit for all
Response fields per order: account_id, order_id, client_oid, order_type, time_in_force, side, exec_inst, quantity, limit_price, order_value, maker_fee_rate, taker_fee_rate, avg_price, cumulative_quantity, cumulative_value, cumulative_fee, status (NEW/PENDING/ACTIVE), order_date, instrument_name, fee_instrument_name, list_id, contingency_type (OTO/OTOCO), leg_id, create_time, create_time_ns, update_time
获取所有未成交的高级订单。
参数类型必填描述
instrument_namestring如BTC_USD,省略则返回所有交易标的的订单
订单响应字段:account_id、order_id、client_oid、order_type、time_in_force、side、exec_inst、quantity、limit_price、order_value、maker_fee_rate、taker_fee_rate、avg_price、cumulative_quantity、cumulative_value、cumulative_fee、status(NEW/PENDING/ACTIVE)、order_date、instrument_name、fee_instrument_name、list_id、contingency_type(OTO/OTOCO)、leg_id、create_time、create_time_ns、update_time

private/advanced/get-order-detail

private/advanced/get-order-detail

Get details for a specific advanced order.
ParamTypeRequiredDescription
order_idnumber or stringDependsString format recommended
client_oidstringDependsEither order_id or client_oid required
Response fields: Same as get-open-orders, with status including: NEW, PENDING, REJECTED, ACTIVE, CANCELED, FILLED
查询特定高级订单的详情。
参数类型必填描述
order_idnumber 或 string可选推荐使用字符串格式
client_oidstring可选必须提供order_id或client_oid
响应字段:与get-open-orders相同,status字段包含:NEW、PENDING、REJECTED、ACTIVE、CANCELED、FILLED

private/advanced/get-order-history

private/advanced/get-order-history

Get historical advanced orders.
ParamTypeRequiredDescription
instrument_namestringNOmit for all
start_timenumber or stringNUnix timestamp (ns recommended). Default: end_time - 1 day
end_timenumber or stringNUnix timestamp (ns recommended). Default: current time
limitintNMax results. Default: 100, Max: 100
Note: If you omit all parameters, you still need to pass
params: {}
for API request consistency.
Response fields: Same as get-open-orders, with status including: REJECTED, CANCELED, FILLED, EXPIRED
Note: To detect partial fills, check for status
ACTIVE
with
cumulative_quantity > 0
.

获取高级订单的历史记录。
参数类型必填描述
instrument_namestring省略则返回所有交易标的的订单
start_timenumber 或 stringUnix时间戳(推荐纳秒级),默认:end_time - 1天
end_timenumber 或 stringUnix时间戳(推荐纳秒级),默认:当前时间
limitint最大结果数,默认100,最大值100
注意:如果省略所有参数,仍需传入
params: {}
以保证API请求格式一致。
响应字段:与get-open-orders相同,status字段包含:REJECTED、CANCELED、FILLED、EXPIRED
注意:要检测部分成交,可查看status为
ACTIVE
cumulative_quantity > 0
的订单。

Wallet API

钱包API

private/create-withdrawal

private/create-withdrawal

Creates a withdrawal request. Withdrawal setting must be enabled for your API Key. Withdrawal addresses must first be whitelisted in your account's Withdrawal Whitelist page.
ParamTypeRequiredDescription
currencystringYe.g., BTC, CRO, USDT
amountstringYGross amount to withdraw (fee is deducted from this). e.g.,
"11"
with fee=1 sends 10 to destination
addressstringYDestination address. Must be whitelisted in Exchange withdrawal settings
client_widstringNOptional client withdrawal ID (max 36 chars)
address_tagstringNSecondary identifier for XRP, XLM, etc. (memo/tag)
network_idstringNNetwork for multi-chain tokens (e.g.,
"ARB"
,
"ETH"
,
"SOL"
). Strongly recommended for multi-chain currencies — use
get-currency-networks
to list available networks and fees
创建提现请求,API密钥必须启用提现权限,提现地址必须先在账户的提现白名单页面中设置。
参数类型必填描述
currencystring如BTC、CRO、USDT
amountstring提现总额(包含手续费),如
"11"
且手续费为1,则收款人收到10
addressstring目标地址,必须已在交易所提现设置中加入白名单
client_widstring可选的客户端自定义提现ID(最多36个字符)
address_tagstringXRP、XLM等币种的二级标识(memo/tag)
network_idstring多链代币的目标网络(如
"ARB"
"ETH"
"SOL"
),强烈推荐为多链币种指定该参数,可通过
get-currency-networks
接口查询可用网络及手续费

private/get-deposit-address

private/get-deposit-address

Get deposit addresses for a currency.
ParamTypeRequiredDescription
currencystringYe.g., BTC, CRO
获取指定币种的充值地址。
参数类型必填描述
currencystring如BTC、CRO

private/get-currency-networks

private/get-currency-networks

Get all supported currency networks including withdrawal fees, minimum amounts, and deposit/withdrawal status.
No required parameters (pass empty
params: {}
).
获取所有支持的币种网络信息,包括提现手续费、最小金额、充值/提现状态。
无必填参数(传入空对象
params: {}
即可)。

private/get-deposit-history

private/get-deposit-history

ParamTypeRequiredDescription
currencystringNe.g., BTC, CRO
start_tslongNDefault: 90 days from current timestamp
end_tslongNDefault: current timestamp
page_sizeintNPage size (Default: 20, Max: 200)
pageintNPage number (0-based)
statusstringN
0
(Not Arrived),
1
(Arrived),
2
(Failed),
3
(Pending)
Note: Works for master account only, not for sub-accounts.
参数类型必填描述
currencystring如BTC、CRO
start_tslong默认:当前时间戳前90天
end_tslong默认:当前时间戳
page_sizeint每页数量(默认20,最大值200)
pageint页码(从0开始)
statusstring
0
(未到账)、
1
(已到账)、
2
(失败)、
3
(处理中)
注意:仅适用于主账户,不支持子账户。

private/get-withdrawal-history

private/get-withdrawal-history

ParamTypeRequiredDescription
currencystringNe.g., BTC, CRO
start_tslongNDefault: 90 days from current timestamp
end_tslongNDefault: current timestamp
page_sizeintNPage size (Default: 20, Max: 200)
pageintNPage number (0-based)
statusstringN
0
(Pending),
1
(Processing),
2
(Rejected),
3
(Payment In-progress),
4
(Payment Failed),
5
(Completed),
6
(Cancelled)
Note: Works for master account only, not for sub-accounts.

参数类型必填描述
currencystring如BTC、CRO
start_tslong默认:当前时间戳前90天
end_tslong默认:当前时间戳
page_sizeint每页数量(默认20,最大值200)
pageint页码(从0开始)
statusstring
0
(待处理)、
1
(处理中)、
2
(已拒绝)、
3
(支付中)、
4
(支付失败)、
5
(已完成)、
6
(已取消)
注意:仅适用于主账户,不支持子账户。

Authentication

身份验证

For endpoints that require authentication (all
private/
methods), you will need to provide Crypto.com Exchange API credentials.
Required credentials:
  • apiKey: Your Crypto.com Exchange API key (for request identification and header)
  • secretKey: Your Crypto.com Exchange API secret (for HMAC-SHA256 signing)
Base URLs:
EnvironmentREST APIUser WebSocketMarket WebSocket
Production
https://api.crypto.com/exchange/v1/{method}
wss://stream.crypto.com/exchange/v1/user
wss://stream.crypto.com/exchange/v1/market
UAT Sandbox
https://uat-api.3ona.co/exchange/v1/{method}
wss://uat-stream.3ona.co/exchange/v1/user
wss://uat-stream.3ona.co/exchange/v1/market
需要身份验证的端点(所有
private/
方法)需要提供Crypto.com Exchange API凭证。
必填凭证:
  • apiKey:你的Crypto.com Exchange API密钥(用于请求标识和请求头)
  • secretKey:你的Crypto.com Exchange API密钥(用于HMAC-SHA256签名)
基础URL:
环境REST API用户WebSocket行情WebSocket
生产环境
https://api.crypto.com/exchange/v1/{method}
wss://stream.crypto.com/exchange/v1/user
wss://stream.crypto.com/exchange/v1/market
UAT沙箱环境
https://uat-api.3ona.co/exchange/v1/{method}
wss://uat-stream.3ona.co/exchange/v1/user
wss://uat-stream.3ona.co/exchange/v1/market

Rate Limits

请求频率限制

Endpoint TypeLimit
private/create-order
,
private/cancel-order
,
private/cancel-all-orders
15 requests per 100ms each
private/get-order-detail
30 requests per 100ms
private/get-trades
1 request per second
private/get-order-history
1 request per second
All other private REST3 requests per 100ms each
Public market data (
get-book
,
get-tickers
,
get-trades
, etc.)
100 requests per second each (per IP)
User API WebSocket150 requests per second
Market Data WebSocket100 requests per second
端点类型限制
private/create-order
private/cancel-order
private/cancel-all-orders
每100ms最多15次请求
private/get-order-detail
每100ms最多30次请求
private/get-trades
每秒最多1次请求
private/get-order-history
每秒最多1次请求
其他私有REST接口每100ms最多3次请求
公开行情数据接口(
get-book
get-tickers
get-trades
等)
每秒最多100次请求(按IP统计)
用户API WebSocket每秒最多150次请求
行情数据WebSocket每秒最多100次请求

Open Order Limits

未成交订单限制

ConditionLimit
Max open orders per trading pair per account/subaccount200
Max open orders across all pairs per account/subaccount1000

条件限制
每个账户/子账户单交易标的最大未成交订单数200
每个账户/子账户所有交易标的最大未成交订单数1000

Security

安全规范

Share Credentials

凭证共享

Users can provide Crypto.com Exchange API credentials by sending a file where the content is in the following format:
bash
abc123...xyz
secret123...key
用户可通过文件提供Crypto.com Exchange API凭证,文件内容格式如下:
bash
abc123...xyz
secret123...key

Never Display Full Secrets

绝不显示完整密钥

When showing credentials to users:
  • API Key: Show first 5 + last 4 characters:
    dG9rZ...8akf
  • Secret Key: Always mask, show only last 5:
    ***...ws1eK
Example response when asked for credentials:
Account: main
API Key: dG9rZ...8akf
Secret: ***...ws1eK
Environment: Production
向用户展示凭证时:
  • API密钥:显示前5位+后4位:
    dG9rZ...8akf
  • 密钥:始终隐藏,仅显示最后5位:
    ***...ws1eK
示例凭证展示:
账户: main
API Key: dG9rZ...8akf
Secret: ***...ws1eK
环境: 生产环境

Listing Accounts

账户列表展示

When listing accounts, show names and environment only — never keys:
Crypto.com Exchange Accounts:
* main (Production)
* sandbox-dev (UAT Sandbox)
展示账户列表时,仅显示账户名称和环境,绝不显示密钥:
Crypto.com Exchange 账户:
* main(生产环境)
* sandbox-dev(UAT沙箱环境)

Transactions in Production

生产环境交易

When performing transactions in production, always confirm with the user before proceeding by asking them to write "CONFIRM" to proceed.

在生产环境执行交易时,必须先向用户确认,要求用户输入"CONFIRM"后再继续。

Crypto.com Exchange Accounts

Crypto.com Exchange 账户

main

main

  • API Key: your_production_api_key
  • Secret: your_production_secret
  • Sandbox: false
  • API Key: your_production_api_key
  • Secret: your_production_secret
  • Sandbox: false

sandbox-dev

sandbox-dev

  • API Key: your_sandbox_api_key
  • Secret: your_sandbox_secret
  • Sandbox: true
  • API Key: your_sandbox_api_key
  • Secret: your_sandbox_secret
  • Sandbox: true

TOOLS.md Structure

TOOLS.md 结构

bash
undefined
bash
undefined

Crypto.com Exchange Accounts

Crypto.com Exchange Accounts

main

main

  • API Key: abc123...xyz
  • Secret: secret123...key
  • Sandbox: false
  • Description: Primary trading account
  • API Key: abc123...xyz
  • Secret: secret123...key
  • Sandbox: false
  • Description: Primary trading account

sandbox-dev

sandbox-dev

  • API Key: test456...abc
  • Secret: testsecret...xyz
  • Sandbox: true
  • Description: Development/testing

---
  • API Key: test456...abc
  • Secret: testsecret...xyz
  • Sandbox: true
  • Description: Development/testing

---

Agent Behavior

Agent 行为规范

  1. Credentials requested: Mask secrets (show last 5 chars only)
  2. Listing accounts: Show names and environment, never keys
  3. Account selection: Ask if ambiguous, default to main
  4. When doing a transaction in production, confirm with user before by asking to write "CONFIRM" to proceed
  5. New credentials: Prompt for name, environment
  6. Order params (
    price
    ,
    quantity
    ,
    notional
    ,
    ref_price
    ,
    amount
    ) must be strings.
    limit
    must be a number.
    page
    /
    page_size
    accept both
  7. Always include
    Content-Type: application/json
    header
  1. 请求凭证时:隐藏密钥(仅显示最后5位)
  2. 展示账户列表时:仅显示名称和环境,绝不显示密钥
  3. 账户选择:如果存在歧义,询问用户,默认选择main账户
  4. 生产环境交易:先要求用户输入"CONFIRM"确认后再执行
  5. 新增凭证:提示用户输入账户名称和环境
  6. 订单参数(
    price
    quantity
    notional
    ref_price
    amount
    )必须为字符串,
    limit
    必须为数字,
    page
    /
    page_size
    支持两种格式
  7. 始终包含
    Content-Type: application/json
    请求头

Adding New Accounts

新增账户

When user provides new credentials:
  • Ask for account name
  • Ask: Production or UAT Sandbox
  • Store in
    TOOLS.md
    with masked display confirmation

当用户提供新凭证时:
  • 询问用户账户名称
  • 询问:生产环境还是UAT沙箱环境
  • 存储到
    TOOLS.md
    中,并向用户展示隐藏后的凭证以确认

Signing Requests

请求签名

All private endpoints require HMAC-SHA256 signature.
所有私有端点需要HMAC-SHA256签名。

Signature Process

签名流程

  1. Sort
    params
    keys in ascending alphabetical order
  2. Concatenate all param keys and values into a single string (no delimiters):
    key1value1key2value2...
    • For arrays: the key appears once, then each element's sorted key+value pairs are concatenated directly (no array indices)
    • For
      None
      /
      null
      values: use the string
      "null"
    • Recursion depth is limited to 3 levels
  3. Build the signing payload:
    {method}{id}{api_key}{param_string}{nonce}
  4. HMAC-SHA256 hash the payload using your secret key, output as hex string
  5. Include
    sig
    in the request body
  1. 按字母升序对
    params
    的键进行排序
  2. 将所有参数的键和值拼接成一个字符串(无分隔符):
    key1value1key2value2...
    • 数组类型:键仅出现一次,然后直接拼接每个元素的排序后键值对(不包含数组索引
    • None
      /
      null
      值:使用字符串
      "null"
    • 递归深度限制为3层
  3. 构建签名字符串:
    {method}{id}{api_key}{param_string}{nonce}
  4. 使用你的密钥对签名字符串进行HMAC-SHA256哈希,输出为十六进制字符串
  5. 在请求体中包含
    sig
    参数

User Agent Header

User Agent 请求头

Include
User-Agent
header with the following string:
crypto-com-exchange/1.0.1 (Skill)
See
references/authentication.md
for implementation details.
请求头中需包含
User-Agent
crypto-com-exchange/1.0.1 (Skill)
详见
references/authentication.md
中的实现细节。