crypto-com-exchange
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCrypto.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
快速参考
| Endpoint | Method | Description | Required | Optional | Authentication |
|---|---|---|---|---|---|
| GET | List all supported instruments | None | None | No |
| GET | Order book for an instrument | instrument_name, depth | None | No |
| GET | Candlestick/OHLCV data | instrument_name | timeframe, count, start_ts, end_ts | No |
| GET | Recent public trades | instrument_name | count, start_ts, end_ts | No |
| GET | Ticker information | None | instrument_name | No |
| GET | Valuation data (index/mark price) | instrument_name, valuation_type | count, start_ts, end_ts | No |
| GET | Expired settlement prices | instrument_type | page (must be ≥1) | No |
| GET | Insurance fund balance | instrument_name | count, start_ts, end_ts | No |
| GET | Exchange announcements (base: | None | category, product_type | No |
| GET | Risk parameters for margin | None | None | No |
| POST | Place a new order | instrument_name, side, type | price, 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 | Yes |
| POST | Batch order creation (1-10, LIST only) | contingency_type, order_list | Per-order params | Yes |
| POST | Modify an existing order | new_price, new_quantity | order_id, orig_client_oid, client_oid | Yes |
| POST | Cancel a single order | order_id or client_oid | None | Yes |
| POST | Batch cancel orders | contingency_type, order_list | None | Yes |
| POST | Cancel all orders | None | instrument_name, type | Yes |
| POST | Close an open position | instrument_name, type | price, quantity, isolation_id | Yes |
| POST | List ALL active open orders | None | instrument_name | Yes |
| POST | Query specific order | order_id or client_oid | None | Yes |
| POST | Historical orders | None | instrument_name, start_time, end_time, limit, isolation_id | Yes |
| POST | Account trade list | None | instrument_name, start_time, end_time, limit, isolation_id | Yes |
| POST | Transaction journal (trading, settlement, funding) | None | instrument_name, journal_type, start_time, end_time, limit, isolation_id | Yes |
| POST | Current wallet balances | None | None | Yes |
| POST | Historical balance snapshots | None | timeframe, end_time, limit | Yes |
| POST | Master/sub-account info | None | page_size, page | Yes |
| POST | All sub-account balances | None | None | Yes |
| POST | Active positions | None | instrument_name | Yes |
| POST | Transfer between accounts | from, to, currency, amount | None | Yes |
| POST | Trading fee structure | None | None | Yes |
| POST | Fee rate by instrument | instrument_name | None | Yes |
| POST | Adjust account leverage | account_id, leverage | None | Yes |
| POST | Update account settings | None | stp_scope, stp_inst, stp_id, leverage | Yes |
| POST | Retrieve account config | None | None | Yes |
| POST | Create a withdrawal | currency, amount, address | client_wid, address_tag, network_id | Yes |
| POST | Get deposit address | currency | None | Yes |
| POST | Get currency network info | None | None | Yes |
| POST | Get deposit history | None | currency, start_ts, end_ts, page_size, page, status | Yes |
| POST | Get withdrawal history | None | currency, start_ts, end_ts, page_size, page, status | Yes |
| POST | Create trigger/stop/TP order | instrument_name, side, type, quantity | price, ref_price, client_oid, time_in_force, exec_inst, stp_scope, stp_inst, stp_id, fee_instrument_name | Yes |
| POST | Create OCO order (2 orders) | order_list (2 orders) | Per-order params | Yes |
| POST | Cancel OCO order | list_id | None | Yes |
| POST | Create OTO order (2 orders) | order_list (2 orders) | Per-order params | Yes |
| POST | Cancel OTO order | list_id | None | Yes |
| POST | Create OTOCO order (3 orders) | order_list (3 orders) | Per-order params | Yes |
| POST | Cancel OTOCO order | list_id | None | Yes |
| POST | Cancel individual OTO/OTOCO leg | order_id or client_oid | None | Yes |
| POST | Cancel all advanced orders | None | instrument_name, type | Yes |
| POST | List open advanced orders | None | instrument_name | Yes |
| POST | Query advanced order detail | order_id or client_oid | None | Yes |
| POST | Advanced order history | None | instrument_name, start_time, end_time, limit | Yes |
| 端点 | 请求方法 | 描述 | 必填参数 | 可选参数 | 身份验证 |
|---|---|---|---|---|---|
| GET | 列出所有支持的交易标的 | 无 | 无 | 不需要 |
| GET | 交易标的的订单簿 | instrument_name, depth | 无 | 不需要 |
| GET | K线/OHLCV数据 | instrument_name | timeframe, count, start_ts, end_ts | 不需要 |
| GET | 近期公开交易记录 | instrument_name | count, start_ts, end_ts | 不需要 |
| GET | 交易标的行情信息 | 无 | instrument_name | 不需要 |
| GET | 估值数据(指数价格/标记价格) | instrument_name, valuation_type | count, start_ts, end_ts | 不需要 |
| GET | 到期结算价格 | instrument_type | page(必须≥1) | 不需要 |
| GET | 保险基金余额 | instrument_name | count, start_ts, end_ts | 不需要 |
| GET | 交易所公告(基础地址: | 无 | category, product_type | 不需要 |
| GET | 保证金风险参数 | 无 | 无 | 不需要 |
| POST | 创建新订单 | instrument_name, side, type | price, 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 | 需要 |
| POST | 批量创建订单(1-10个,仅支持LIST类型) | contingency_type, order_list | 单订单参数 | 需要 |
| POST | 修改现有订单 | new_price, new_quantity | order_id, orig_client_oid, client_oid | 需要 |
| POST | 取消单个订单 | order_id 或 client_oid | 无 | 需要 |
| POST | 批量取消订单 | contingency_type, order_list | 无 | 需要 |
| POST | 取消所有订单 | 无 | instrument_name, type | 需要 |
| POST | 平仓 | instrument_name, type | price, quantity, isolation_id | 需要 |
| POST | 列出所有活跃订单 | 无 | instrument_name | 需要 |
| POST | 查询特定订单详情 | order_id 或 client_oid | 无 | 需要 |
| POST | 历史订单记录 | 无 | instrument_name, start_time, end_time, limit, isolation_id | 需要 |
| POST | 账户交易记录列表 | 无 | instrument_name, start_time, end_time, limit, isolation_id | 需要 |
| POST | 交易日志(交易、结算、资金) | 无 | instrument_name, journal_type, start_time, end_time, limit, isolation_id | 需要 |
| POST | 当前钱包余额 | 无 | 无 | 需要 |
| POST | 历史余额快照 | 无 | timeframe, end_time, limit | 需要 |
| POST | 主账户/子账户信息 | 无 | page_size, page | 需要 |
| POST | 所有子账户余额 | 无 | 无 | 需要 |
| POST | 活跃持仓 | 无 | instrument_name | 需要 |
| POST | 账户间转账 | from, to, currency, amount | 无 | 需要 |
| POST | 交易手续费结构 | 无 | 无 | 需要 |
| POST | 交易标的手续费率 | instrument_name | 无 | 需要 |
| POST | 调整账户杠杆 | account_id, leverage | 无 | 需要 |
| POST | 更新账户设置 | 无 | stp_scope, stp_inst, stp_id, leverage | 需要 |
| POST | 获取账户配置 | 无 | 无 | 需要 |
| POST | 创建提现请求 | currency, amount, address | client_wid, address_tag, network_id | 需要 |
| POST | 获取充值地址 | currency | 无 | 需要 |
| POST | 获取币种网络信息 | 无 | 无 | 需要 |
| POST | 获取充值历史 | 无 | currency, start_ts, end_ts, page_size, page, status | 需要 |
| POST | 获取提现历史 | 无 | currency, start_ts, end_ts, page_size, page, status | 需要 |
| POST | 创建触发/止损/止盈订单 | instrument_name, side, type, quantity | price, ref_price, client_oid, time_in_force, exec_inst, stp_scope, stp_inst, stp_id, fee_instrument_name | 需要 |
| POST | 创建OCO订单(2个订单) | order_list(2个订单) | 单订单参数 | 需要 |
| POST | 取消OCO订单 | list_id | 无 | 需要 |
| POST | 创建OTO订单(2个订单) | order_list(2个订单) | 单订单参数 | 需要 |
| POST | 取消OTO订单 | list_id | 无 | 需要 |
| POST | 创建OTOCO订单(3个订单) | order_list(3个订单) | 单订单参数 | 需要 |
| POST | 取消OTOCO订单 | list_id | 无 | 需要 |
| POST | 取消OTO/OTOCO订单的单个子订单 | order_id 或 client_oid | 无 | 需要 |
| POST | 取消所有高级订单 | 无 | instrument_name, type | 需要 |
| POST | 列出所有未成交的高级订单 | 无 | instrument_name | 需要 |
| POST | 查询高级订单详情 | order_id 或 client_oid | 无 | 需要 |
| 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). Case-sensitive —CRO_USDwill not workbtc_usd - side: Order side — or
BUYSELL - type: Order type — or
LIMITMARKET - 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: (default) or
SPOTMARGIN - 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). Nanosecond recommended for accurate paginationget-transactions - 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). Ignored on trading endpoints (get-withdrawal-history,get-order-history,get-trades) — useget-open-ordersinsteadlimit - 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 supported for OCO/OTO/OTOCO trigger legs
MARK_PRICE - contingency_type: for batch orders via
LIST(OCO/OTO/OTOCO are NOT supported on this endpoint — returns 140001 API_DISABLED). Usecreate-order-list,private/advanced/create-oco,create-otoinsteadcreate-otoco - 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:接口的批量订单类型(仅支持LIST,OCO/OTO/OTOCO不支持该接口,会返回错误140001 API_DISABLED),请使用
create-order-list、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 for values
get-currency-networks - client_wid: Optional client withdrawal ID
- status: Filter by status. Deposit: (Not Arrived),
0(Arrived),1(Failed),2(Pending). Withdrawal:3(Pending),0(Processing),1(Rejected),2(Payment In-progress),3(Payment Failed),4(Completed),5(Cancelled)6 - journal_type: Transaction journal type filter. Values: ,
TRADING,SESSION_SETTLE, etc.FUNDING
- 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— order/amount params must be strings (e.g.,new_quantitynot"0.01"). Sending as number returns errors:0.01→ 308,price→ 40101,quantity→ 50001,notional→ 229ref_price - Must be numbers: ,
limit(onend_time) — must be integers. Sendinguser-balance-historyas string returns error 40003 onlimit,get-order-history,get-trades,get-transactions,user-balance-historyadvanced/get-order-history - Accept both: ,
page,page_size,count,depth,start_time(on trading history),end_time,start_tsend_ts
- 必须为字符串:、
price、quantity、notional、ref_price、amount、new_price——订单/金额参数必须为字符串格式(如new_quantity而非"0.01")。如果传入数字会返回错误:0.01→308、price→40101、quantity→50001、notional→229ref_price - 必须为数字:、
limit(end_time接口)——必须为整数。如果user-balance-history传入字符串,在limit、get-order-history、get-trades、get-transactions、user-balance-history接口会返回错误40003advanced/get-order-history - 两种格式都支持:、
page、page_size、count、depth(交易历史接口)、start_time(交易历史接口)、end_time、start_tsend_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: requires
public/get-expired-settlement-price. Sendingpage >= 1returns error 40004. Omittingpage=0entirely works (returns first page)page - Withdrawal whitelist: 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)
private/create-withdrawal - Withdrawal amount is gross: includes the fee. If you send
amountand the network fee is 1, the recipient gets 10. The response showsamount: "11"andamount: 10fee: 1 - Withdrawal network_id: For multi-chain tokens (USDC, USDT, etc.), always specify . Without it, the API may reject or pick an unexpected default chain
network_id - MARKET order + price: MARKET orders ignore if provided (no error). For MARKET BUY, use
price. For MARKET SELL, usenotionalquantity - POST_ONLY on MARKET: Returns error 43005 (POST_ONLY_REJ). POST_ONLY only works with LIMIT orders
- FOK/IOC on far-from-market LIMIT: and
FILL_OR_KILLon limit orders far from market will immediately reject (43003/43004) since they can't fillIMMEDIATE_OR_CANCEL - amend-order requires both: Both AND
new_pricemust always be provided (even if one is unchanged). Omitting either returns 40004new_quantity - Batch order max: accepts maximum 10 orders. 11+ returns 40004
create-order-list - 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 don't cause errors
params - Inverted time range: >
start_timedoes NOT error — the API appears to ignore ordering and returns data anywayend_time - cancel-all-orders scopes by instrument: Only cancels orders for the specified . Other instruments' orders are untouched
instrument_name - 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: takes priority over
quantity. If the quantity is below minimum, you get error 415 even if notional would be validnotional - get-open-orders has NO pagination: ,
page,page_size, andcountparams are all ignored — returns ALL open orders regardlesslimit - get-order-history/get-trades pagination: works correctly.
limit/pageare ignored (always returns up topage_size, default 100). Uselimit/start_timefor windowed queriesend_time - Nonce accepts int or string — float is rejected (40101). must be a number (string → 40001)
id - Candlestick count max 300: Requesting more silently caps at 300. returns 40004. Min is 1
count=0 - Public trades count max 150: Requesting more silently caps at 150
- get-instruments has no server-side filtering: ,
inst_type, and other filter params are ignored — always returns ALL instruments (852+). Filter client-sidecurrency - order_id format: Always a numeric string (e.g., ). Returned as string, accepted as string or number
"6530219599901000701" - spot_margin values: Only or
"SPOT"are valid. Invalid values → 50001."MARGIN"requires margin access (error 416 without it)"MARGIN" - get-valuations requires both params: Must provide AND
instrument_name(onlyvaluation_typeworks for spot pairs;mark_price→ 40004). Withoutindex_price→ 40003valuation_type - 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. Legacy format also works:1M,M1,M5,M15,M30,H1,H2,H4,H12,D1,D7. Invalid timeframes (e.g.,D14,2m,8h) return 400033D - Trading history endpoints (,
get-order-history,get-trades) useget-transactions/start_timewith nanosecond precision recommendedend_time - Wallet history endpoints (,
get-deposit-history) useget-withdrawal-history/start_tsin millisecondsend_ts - is used instead of
notionalfor MARKET BUY orders (specifies spend amount in quote currency)quantity - For MARKET SELL orders, use (amount of base currency to sell)
quantity - If you omit all parameters, you still need to pass an empty params block for API request consistency
params: {}
- FAR_AWAY_LIMIT_PRICE (315):限价价格与市场价格偏差过大的限价单会被拒绝(如以1美元买入BTC或以999,999美元卖出BTC),请确保限价价格在当前市场价格的合理范围内
- 到期结算价格分页:接口要求
public/get-expired-settlement-price,传入page >=1会返回错误40004,省略page=0参数会返回第一页数据page - 提现白名单:接口要求目标地址已在你的交易所提现设置中加入白名单(而非App),未加入白名单的地址会返回错误5000811(WITHDRAW_ADDRESS_NOT_IN_WHITE_LIST)
private/create-withdrawal - 提现金额为总额:包含手续费。如果传入
amount且网络手续费为1,收款人将收到10,响应结果会显示amount: "11"和amount: 10fee: 1 - 提现network_id:对于多链代币(如USDC、USDT等),请务必指定,否则API可能会拒绝请求或选择非预期的默认链
network_id - 市价单+price参数:市价单会忽略传入的参数(不会返回错误)。市价买入请使用
price参数,市价卖出请使用notional参数quantity - 市价单使用POST_ONLY:会返回错误43005(POST_ONLY_REJ),POST_ONLY仅适用于限价单
- 偏离市场价格的限价单使用FOK/IOC:与市场价格偏差过大的限价单使用FILL_OR_KILL或IMMEDIATE_OR_CANCEL会立即被拒绝(43003/43004),因为无法成交
- 修改订单需同时提供两个参数:必须同时提供和
new_price(即使其中一个未变更),省略任意一个会返回错误40004new_quantity - 批量订单数量上限:接口最多支持10个订单,传入11个及以上会返回错误40004
create-order-list - HTTP方法严格限制:公开端点仅接受GET请求(POST请求会返回错误50001),私有端点仅接受POST请求(GET请求会返回错误40003)
- 修改已取消/已成交订单:会返回错误212(INVALID_ORDERID),仅能修改活跃订单
- 未知参数会被静默忽略:中的多余/未知参数不会导致错误
params - 时间范围倒置:不会返回错误,API会忽略顺序并返回数据
start_time > end_time - 取消所有订单按交易标的过滤:仅会取消指定的订单,其他交易标的的订单不受影响
instrument_name - 同一交易标的允许多个止损订单:同一交易标的的并发触发订单数量无限制
- OTO订单的第二个子订单必须为触发订单:OTO订单的附属子订单必须为STOP_LOSS、STOP_LIMIT、TAKE_PROFIT或TAKE_PROFIT_LIMIT类型,不能为普通限价单,否则会返回错误40004
- OTOCO订单结构:子订单1=主限价单,子订单2=止盈触发订单,子订单3=止损触发订单,子订单2和3必须与主订单方向相反
- 市价买入同时传入notional和quantity:优先级高于
quantity,如果quantity低于最小要求,即使notional符合要求也会返回错误415notional - get-open-orders接口无分页:、
page、page_size、count参数都会被忽略,会返回所有未成交订单limit - get-order-history/get-trades分页:参数生效,
limit/page参数会被忽略(最多返回page_size条数据,默认100),请使用limit/start_time进行时间范围查询end_time - Nonce支持整数或字符串——传入浮点数会被拒绝(40101),必须为数字(传入字符串会返回错误40001)
id - K线count最大值300:请求超过300条会自动截断为300条,会返回错误40004,最小值为1
count=0 - 公开交易记录count最大值150:请求超过150条会自动截断为150条
- get-instruments接口无服务端过滤:、
inst_type等过滤参数会被忽略,会返回所有交易标的(852+个),请在客户端进行过滤currency - order_id格式:始终为数字字符串(如),响应结果中为字符串格式,请求时可传入字符串或数字
"6530219599901000701" - spot_margin有效值:仅或
"SPOT"有效,传入无效值会返回错误50001,"MARGIN"需要开通保证金权限(未开通会返回错误416)"MARGIN" - get-valuations接口需同时提供两个参数:必须提供和
instrument_name(现货交易对仅支持valuation_type,传入mark_price会返回错误40004),省略index_price会返回错误40003valuation_type - 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)会返回错误400033D - 交易历史接口(、
get-order-history、get-trades)使用get-transactions/start_time,推荐使用纳秒级精度end_time - 钱包历史接口(、
get-deposit-history)使用get-withdrawal-history/start_ts(毫秒级)end_ts - 市价买入订单使用参数(指定计价币种的花费金额)
notional - 市价卖出订单使用参数(指定基础币种的卖出数量)
quantity - 如果省略所有参数,仍需传入空参数对象以保证API请求格式一致
params: {}
Advanced Order Management API
高级订单管理API
Advanced order types (trigger orders, OCO, OTO, OTOCO) are managed through the endpoints. These are Spot-only for now.
private/advanced/*高级订单类型(触发订单、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).
- and
STOP_LIMITexecute a LIMIT order whenTAKE_PROFIT_LIMITis reachedref_price - and
STOP_LOSSexecute a MARKET order whenTAKE_PROFITis reachedref_price
Trigger direction:
- 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
ref_price
| Param | Type | Required | Description |
|---|---|---|---|
| instrument_name | string | Y | e.g., BTC_USD |
| side | string | Y | BUY, SELL |
| type | string | Y | STOP_LOSS, STOP_LIMIT, TAKE_PROFIT, TAKE_PROFIT_LIMIT |
| price | string | Depends | For STOP_LIMIT and TAKE_PROFIT_LIMIT only: limit price (e.g., |
| quantity | string | Y | Order quantity (e.g., |
| ref_price | string | N | Trigger price (e.g., |
| client_oid | string | N | Client order ID (max 36 chars) |
| time_in_force | string | N | GOOD_TILL_CANCEL (default), FILL_OR_KILL, IMMEDIATE_OR_CANCEL |
| exec_inst | array | N | POST_ONLY, SMART_POST_ONLY (cannot coexist) |
| stp_scope | string | N | M (master/sub) or S (sub only) |
| stp_inst | string | N* | M (cancel maker), T (cancel taker), B (cancel both). Required if stp_scope is set |
| stp_id | string | N | 0 to 32767 |
| fee_instrument_name | string | N | Preferred 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
触发方向:
- 低于市场价格:卖出STOP_LOSS/STOP_LIMIT,买入TAKE_PROFIT/TAKE_PROFIT_LIMIT
ref_price - 高于市场价格:买入STOP_LOSS/STOP_LIMIT,卖出TAKE_PROFIT/TAKE_PROFIT_LIMIT
ref_price
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| instrument_name | string | 是 | 如BTC_USD |
| side | string | 是 | BUY、SELL |
| type | string | 是 | STOP_LOSS、STOP_LIMIT、TAKE_PROFIT、TAKE_PROFIT_LIMIT |
| price | string | 可选 | 仅STOP_LIMIT和TAKE_PROFIT_LIMIT类型需要:限价价格(如 |
| quantity | string | 是 | 订单数量(如 |
| ref_price | string | 否 | 触发价格(如 |
| client_oid | string | 否 | 客户端订单ID(最多36个字符) |
| time_in_force | string | 否 | GOOD_TILL_CANCEL(默认)、FILL_OR_KILL、IMMEDIATE_OR_CANCEL |
| exec_inst | array | 否 | POST_ONLY、SMART_POST_ONLY(两者不能同时存在) |
| stp_scope | string | 否 | M(主账户/子账户)或S(仅子账户) |
| stp_inst | string | 可选* | M(取消maker订单)、T(取消taker订单)、B(取消双方订单),设置stp_scope时必填 |
| stp_id | string | 否 | 0至32767 |
| fee_instrument_name | string | 否 | 优先使用的手续费代币 |
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).
| Param | Type | Required | Description |
|---|---|---|---|
| order_list | array | Y | Exactly 2 orders. One must be LIMIT, other must be a trigger type |
Each order in follows params. For of the trigger order, only is supported.
order_listprivate/create-orderref_price_typeMARK_PRICEjson
{
"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_list | array | 是 | 必须包含2个订单,一个为限价单,另一个为触发订单 |
order_listprivate/create-orderref_price_typeMARK_PRICEjson
{
"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).
| Param | Type | Required | Description |
|---|---|---|---|
| order_list | array | Y | Exactly 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_list | array | 是 | 必须包含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.
| Param | Type | Required | Description |
|---|---|---|---|
| order_list | array | Y | Exactly 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_list | array | 是 | 必须包含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.
| Param | Type | Required | Description |
|---|---|---|---|
| list_id | string | Y | List ID returned from create |
json
{ "method": "private/advanced/cancel-oco", "id": 1234, "nonce": 123456789000, "params": { "list_id": "4421958062479290999" } }取消OCO/OTO/OTOCO订单组。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| list_id | string | 是 | 创建订单时返回的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.
| Param | Type | Required | Description |
|---|---|---|---|
| order_id | number or string | Depends | Either order_id or client_oid must be present. String format recommended |
| client_oid | string | Depends | Either order_id or client_oid must be present |
取消OTO/OTOCO订单的单个子订单。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| order_id | number 或 string | 可选 | 必须提供order_id或client_oid,推荐使用字符串格式 |
| client_oid | string | 可选 | 必须提供order_id或client_oid |
private/advanced/cancel-all-orders
private/advanced/cancel-all-orders
Cancel all advanced orders for an instrument.
| Param | Type | Required | Description |
|---|---|---|---|
| instrument_name | string | N | e.g., BTC_USD. Omit to cancel ALL instruments |
| type | string | N | LIMIT, TRIGGER, or ALL |
取消指定交易标的的所有高级订单。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| instrument_name | string | 否 | 如BTC_USD,省略则取消所有交易标的的高级订单 |
| type | string | 否 | LIMIT、TRIGGER或ALL |
private/advanced/get-open-orders
private/advanced/get-open-orders
Get all open advanced orders.
| Param | Type | Required | Description |
|---|---|---|---|
| instrument_name | string | N | e.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_name | string | 否 | 如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.
| Param | Type | Required | Description |
|---|---|---|---|
| order_id | number or string | Depends | String format recommended |
| client_oid | string | Depends | Either order_id or client_oid required |
Response fields: Same as get-open-orders, with status including: NEW, PENDING, REJECTED, ACTIVE, CANCELED, FILLED
查询特定高级订单的详情。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| order_id | number 或 string | 可选 | 推荐使用字符串格式 |
| client_oid | string | 可选 | 必须提供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.
| Param | Type | Required | Description |
|---|---|---|---|
| instrument_name | string | N | Omit for all |
| start_time | number or string | N | Unix timestamp (ns recommended). Default: end_time - 1 day |
| end_time | number or string | N | Unix timestamp (ns recommended). Default: current time |
| limit | int | N | Max results. Default: 100, Max: 100 |
Note: If you omit all parameters, you still need to pass for API request consistency.
params: {}Response fields: Same as get-open-orders, with status including: REJECTED, CANCELED, FILLED, EXPIRED
Note: To detect partial fills, check for status with .
ACTIVEcumulative_quantity > 0获取高级订单的历史记录。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| instrument_name | string | 否 | 省略则返回所有交易标的的订单 |
| start_time | number 或 string | 否 | Unix时间戳(推荐纳秒级),默认:end_time - 1天 |
| end_time | number 或 string | 否 | Unix时间戳(推荐纳秒级),默认:当前时间 |
| limit | int | 否 | 最大结果数,默认100,最大值100 |
注意:如果省略所有参数,仍需传入以保证API请求格式一致。
params: {}响应字段:与get-open-orders相同,status字段包含:REJECTED、CANCELED、FILLED、EXPIRED
注意:要检测部分成交,可查看status为且的订单。
ACTIVEcumulative_quantity > 0Wallet 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.
| Param | Type | Required | Description |
|---|---|---|---|
| currency | string | Y | e.g., BTC, CRO, USDT |
| amount | string | Y | Gross amount to withdraw (fee is deducted from this). e.g., |
| address | string | Y | Destination address. Must be whitelisted in Exchange withdrawal settings |
| client_wid | string | N | Optional client withdrawal ID (max 36 chars) |
| address_tag | string | N | Secondary identifier for XRP, XLM, etc. (memo/tag) |
| network_id | string | N | Network for multi-chain tokens (e.g., |
创建提现请求,API密钥必须启用提现权限,提现地址必须先在账户的提现白名单页面中设置。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| currency | string | 是 | 如BTC、CRO、USDT |
| amount | string | 是 | 提现总额(包含手续费),如 |
| address | string | 是 | 目标地址,必须已在交易所提现设置中加入白名单 |
| client_wid | string | 否 | 可选的客户端自定义提现ID(最多36个字符) |
| address_tag | string | 否 | XRP、XLM等币种的二级标识(memo/tag) |
| network_id | string | 否 | 多链代币的目标网络(如 |
private/get-deposit-address
private/get-deposit-address
Get deposit addresses for a currency.
| Param | Type | Required | Description |
|---|---|---|---|
| currency | string | Y | e.g., BTC, CRO |
获取指定币种的充值地址。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| currency | string | 是 | 如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
| Param | Type | Required | Description |
|---|---|---|---|
| currency | string | N | e.g., BTC, CRO |
| start_ts | long | N | Default: 90 days from current timestamp |
| end_ts | long | N | Default: current timestamp |
| page_size | int | N | Page size (Default: 20, Max: 200) |
| page | int | N | Page number (0-based) |
| status | string | N | |
Note: Works for master account only, not for sub-accounts.
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| currency | string | 否 | 如BTC、CRO |
| start_ts | long | 否 | 默认:当前时间戳前90天 |
| end_ts | long | 否 | 默认:当前时间戳 |
| page_size | int | 否 | 每页数量(默认20,最大值200) |
| page | int | 否 | 页码(从0开始) |
| status | string | 否 | |
注意:仅适用于主账户,不支持子账户。
private/get-withdrawal-history
private/get-withdrawal-history
| Param | Type | Required | Description |
|---|---|---|---|
| currency | string | N | e.g., BTC, CRO |
| start_ts | long | N | Default: 90 days from current timestamp |
| end_ts | long | N | Default: current timestamp |
| page_size | int | N | Page size (Default: 20, Max: 200) |
| page | int | N | Page number (0-based) |
| status | string | N | |
Note: Works for master account only, not for sub-accounts.
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| currency | string | 否 | 如BTC、CRO |
| start_ts | long | 否 | 默认:当前时间戳前90天 |
| end_ts | long | 否 | 默认:当前时间戳 |
| page_size | int | 否 | 每页数量(默认20,最大值200) |
| page | int | 否 | 页码(从0开始) |
| status | string | 否 | |
注意:仅适用于主账户,不支持子账户。
Authentication
身份验证
For endpoints that require authentication (all methods), you will need to provide Crypto.com Exchange API credentials.
private/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:
| Environment | REST API | User WebSocket | Market WebSocket |
|---|---|---|---|
| Production | | | |
| UAT Sandbox | | | |
需要身份验证的端点(所有方法)需要提供Crypto.com Exchange API凭证。
private/必填凭证:
- apiKey:你的Crypto.com Exchange API密钥(用于请求标识和请求头)
- secretKey:你的Crypto.com Exchange API密钥(用于HMAC-SHA256签名)
基础URL:
| 环境 | REST API | 用户WebSocket | 行情WebSocket |
|---|---|---|---|
| 生产环境 | | | |
| UAT沙箱环境 | | | |
Rate Limits
请求频率限制
| Endpoint Type | Limit |
|---|---|
| 15 requests per 100ms each |
| 30 requests per 100ms |
| 1 request per second |
| 1 request per second |
| All other private REST | 3 requests per 100ms each |
Public market data ( | 100 requests per second each (per IP) |
| User API WebSocket | 150 requests per second |
| Market Data WebSocket | 100 requests per second |
| 端点类型 | 限制 |
|---|---|
| 每100ms最多15次请求 |
| 每100ms最多30次请求 |
| 每秒最多1次请求 |
| 每秒最多1次请求 |
| 其他私有REST接口 | 每100ms最多3次请求 |
公开行情数据接口( | 每秒最多100次请求(按IP统计) |
| 用户API WebSocket | 每秒最多150次请求 |
| 行情数据WebSocket | 每秒最多100次请求 |
Open Order Limits
未成交订单限制
| Condition | Limit |
|---|---|
| Max open orders per trading pair per account/subaccount | 200 |
| Max open orders across all pairs per account/subaccount | 1000 |
| 条件 | 限制 |
|---|---|
| 每个账户/子账户单交易标的最大未成交订单数 | 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...keyNever 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
undefinedbash
undefinedCrypto.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 行为规范
- Credentials requested: Mask secrets (show last 5 chars only)
- Listing accounts: Show names and environment, never keys
- Account selection: Ask if ambiguous, default to main
- When doing a transaction in production, confirm with user before by asking to write "CONFIRM" to proceed
- New credentials: Prompt for name, environment
- Order params (,
price,quantity,notional,ref_price) must be strings.amountmust be a number.limit/pageaccept bothpage_size - Always include header
Content-Type: application/json
- 请求凭证时:隐藏密钥(仅显示最后5位)
- 展示账户列表时:仅显示名称和环境,绝不显示密钥
- 账户选择:如果存在歧义,询问用户,默认选择main账户
- 生产环境交易:先要求用户输入"CONFIRM"确认后再执行
- 新增凭证:提示用户输入账户名称和环境
- 订单参数(、
price、quantity、notional、ref_price)必须为字符串,amount必须为数字,limit/page支持两种格式page_size - 始终包含请求头
Content-Type: application/json
Adding New Accounts
新增账户
When user provides new credentials:
- Ask for account name
- Ask: Production or UAT Sandbox
- Store in with masked display confirmation
TOOLS.md
当用户提供新凭证时:
- 询问用户账户名称
- 询问:生产环境还是UAT沙箱环境
- 存储到中,并向用户展示隐藏后的凭证以确认
TOOLS.md
Signing Requests
请求签名
All private endpoints require HMAC-SHA256 signature.
所有私有端点需要HMAC-SHA256签名。
Signature Process
签名流程
- Sort keys in ascending alphabetical order
params - 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 /
Nonevalues: use the stringnull"null" - Recursion depth is limited to 3 levels
- Build the signing payload:
{method}{id}{api_key}{param_string}{nonce} - HMAC-SHA256 hash the payload using your secret key, output as hex string
- Include in the request body
sig
- 按字母升序对的键进行排序
params - 将所有参数的键和值拼接成一个字符串(无分隔符):
key1value1key2value2...- 数组类型:键仅出现一次,然后直接拼接每个元素的排序后键值对(不包含数组索引)
- /
None值:使用字符串null"null" - 递归深度限制为3层
- 构建签名字符串:
{method}{id}{api_key}{param_string}{nonce} - 使用你的密钥对签名字符串进行HMAC-SHA256哈希,输出为十六进制字符串
- 在请求体中包含参数
sig
User Agent Header
User Agent 请求头
Include header with the following string:
User-Agentcrypto-com-exchange/1.0.1 (Skill)See for implementation details.
references/authentication.md请求头中需包含:
User-Agentcrypto-com-exchange/1.0.1 (Skill)详见中的实现细节。
references/authentication.md