# Table of Contents
- [Introduction | SunX](#introduction-sunx)
- [充值与提现 | 孙悟空](#-)
- [钱包连接 | 孙悟空](#-)
- [介绍 | 孙悟空](#-)
- [孙悟空答网友问 | 孙悟空](#-)
- [自动减仓(ADL) | 孙悟空](#-adl-)
- [风险提示 | 孙悟空](#-)
- [关于强平价 | 孙悟空](#-)
- [标记价格 | 孙悟空](#-)
- [订单类型 | 孙悟空](#-)
- [交易手续费 | 孙悟空](#-)
- [交易账户和保证金 | 孙悟空](#-)
- [资金费用 | 孙悟空](#-)
- [清算机制 | 孙悟空](#-)
- [最新价格、指数价格和标记价格 | 孙悟空](#-)
- [止盈止损 | 孙悟空](#-)
- [合约信息 | 孙悟空](#-)
- [关于孙悟空质押产品年化利率调整的公告 | 孙悟空](#-)
- [邀请好友,每日赚最高 1,500 枚$SUN | 孙悟空](#-1-500-sun-)
- [邀请好友赚「悟空积分」,兑换USDT、iPhone17! | 孙悟空](#-usdt-iphone17-)
- [【0 Gas继续享】Tron链首次Approve,Gas费100%返还! | 孙悟空](#-0-gas-tron-approve-gas-100-)
- [安全审计报告 | 孙悟空](#-)
- [质押规则 | 孙悟空](#-)
- [孙悟空重磅上线质押,轻松赚取12% APY | 孙悟空](#-12-apy-)
- [邀请好友,赚取10%手续费返现和返佣! | 孙悟空](#-10-)
- [孙悟空重磅发布:$5,000,000$ 空投计划 #1:Arbitrum专场! | 孙悟空](#-5-000-000-1-arbitrum-)
- [交易规则 | 孙悟空](#-)
- [双十一剁手了?别慌,孙悟空“回血计划”启动! 限时加佣10%,最高领取$2,888现金奖励! | 孙悟空](#-10-2-888-)
- [135 万美金奖励来袭|孙悟空平台第一期交易挖矿重磅上线 | 孙悟空](#135-)
- [孙悟空合约体验金早鸟计划:邀请好友,抢先体验四重早鸟特权 | 孙悟空](#-)
- [孙悟空KOL「交易冲刺计划」重磅启动,月月领$10,000奖励! | 孙悟空](#-kol-10-000-)
- [孙悟空KOL专享双重感恩礼遇,限时加佣10%,最高领取$2,800答谢礼! | 孙悟空](#-kol-10-2-800-)
- [邀请好友,瓜分100万枚SUN | 孙悟空](#-100-sun-)
- [交易挖矿活动$SUN代币回购详情公示 | 孙悟空](#-sun-)
- [135 万美金奖励来袭|孙悟空平台第二期交易挖矿重磅上线 | 孙悟空](#135-)
- [孙悟空-Affiliate返佣规则 | 孙悟空](#-affiliate-)
- [【限时14天】孙悟空体验金上线,全民撸百万美金空投! | 孙悟空](#-14-)
- [31.5万美金福利来袭|孙悟空平台第三期交易挖矿上线 | 孙悟空](#31-5-)
- [如何获取/绑定邀请码? | 孙悟空](#-)
- [邀请规则 | 孙悟空](#-)
- [简介 | 孙悟空](#-)
- [快速开始 | 孙悟空](#-)
- [接口类型 | 孙悟空](#-)
- [接入准备 | 孙悟空](#-)
- [websocket心跳 | 孙悟空](#websocket-)
- [市场行情心跳 | 孙悟空](#-)
- [Rest | 孙悟空](#rest-)
- [订单推送心跳 | 孙悟空](#-)
- [签名认证 | 孙悟空](#-)
- [阶梯限仓的梯度仓位 | 孙悟空](#-)
- [基础信息 | 孙悟空](#-)
- [账户类 | 孙悟空](#-)
- [Websocket订阅 | 孙悟空](#websocket-)
- [服务条款 | 孙悟空](#-)
- [社交媒体 | 孙悟空](#-)
- [Websocket交易 | 孙悟空](#websocket-)
- [获取合约指数信息 | 孙悟空](#-)
- [查询联合保证金支持币种 | 孙悟空](#-)
- [私有频道 | 孙悟空](#-)
- [隐私政策 | 孙悟空](#-)
- [查询用户当前的手续费费率 | 孙悟空](#-)
- [查询账户余额 | 孙悟空](#-)
- [组合查询用户财务记录 | 孙悟空](#-)
- [获取合约最高限价和最低限价 | 孙悟空](#-)
- [钱包 | 孙悟空](#-)
- [公共频道 | 孙悟空](#-)
- [错误代码 | 孙悟空](#-)
- [获取合约的资金费率 | 孙悟空](#-)
- [获取合约的历史资金费率 | 孙悟空](#-)
- [持仓类 | 孙悟空](#-)
- [媒体工具包 | 孙悟空](#-)
- [获取合约最高限价和最低限价 | 孙悟空](#-)
- [获取合约信息 | 孙悟空](#-)
- [Ws 合约批量撤单 | 孙悟空](#ws-)
- [订单类 | 孙悟空](#-)
- [确认提币请求 | 孙悟空](#-)
- [发起提币请求 | 孙悟空](#-)
- [设置持仓模式 | 孙悟空](#-)
- [设置杠杆等级 | 孙悟空](#-)
- [查询持仓模式 | 孙悟空](#-)
- [行情数据 | 孙悟空](#-)
- [订阅买一卖一逐笔行情推送 | 孙悟空](#-)
- [查询持仓风险限额 | 孙悟空](#-)
- [查看充提记录 | 孙悟空](#-)
- [一键全平 | 孙悟空](#-)
- [撤单 | 孙悟空](#-)
- [订阅 Market Depth 数据 | 孙悟空](#-market-depth-)
- [批量撤单 | 孙悟空](#-)
- [用户持仓量限制的查询 | 孙悟空](#-)
- [订阅成交变动数据 | 孙悟空](#-)
- [市价全平 | 孙悟空](#-)
- [全部撤单 | 孙悟空](#-)
- [Ws 合约批量下单 | 孙悟空](#ws-)
- [查询杠杆等级列表 | 孙悟空](#-)
- [查询当前持仓 | 孙悟空](#-)
- [订阅Market Depth增量数据 | 孙悟空](#-market-depth-)
- [订阅(sub)指数K线数据 | 孙悟空](#-sub-k-)
- [订阅 KLine 数据 | 孙悟空](#-kline-)
- [订阅 Trade Detail 数据 | 孙悟空](#-trade-detail-)
- [订阅撮合后的订单数据 | 孙悟空](#-)
- [下单 | 孙悟空](#-)
- [批量下单 | 孙悟空](#-)
- [订阅账户变动数据 | 孙悟空](#-)
- [订阅持仓变动数据 | 孙悟空](#-)
- [获取聚合行情 | 孙悟空](#-)
- [获取行情深度数据 | 孙悟空](#-)
- [获取K线数据 | 孙悟空](#-k-)
- [获取市场最优挂单 | 孙悟空](#-)
- [获取标记价格的K线数据 | 孙悟空](#-k-)
- [获取市场最近成交记录 | 孙悟空](#-)
- [获取合约的溢价指数K线 | 孙悟空](#-k-)
- [批量获取最近的交易记录 | 孙悟空](#-)
- [查询用户当前的下单量限制 | 孙悟空](#-)
- [获取实时预测资金费率的K线数据 | 孙悟空](#-k-)
- [查询成交明细 | 孙悟空](#-)
- [订阅订单数据 | 孙悟空](#-)
- [查询订单信息 | 孙悟空](#-)
- [查询当前委托 | 孙悟空](#-)
- [查询历史委托 | 孙悟空](#-)
- [Introduction | SunX](#introduction-sunx)
- [Accounts & Wallets | SunX](#accounts-wallets-sunx)
- [Guide to Deposits and Withdrawals | SunX](#guide-to-deposits-and-withdrawals-sunx)
- [Auto-Deleveraging (ADL) | SunX](#auto-deleveraging-adl-sunx)
- [SunX Online Q&A | SunX](#sunx-online-q-a-sunx)
- [Order Type | SunX](#order-type-sunx)
- [Mark Price | SunX](#mark-price-sunx)
- [Forced Liquidation and Prices | SunX](#forced-liquidation-and-prices-sunx)
- [Trading Fees | SunX](#trading-fees-sunx)
- [Trading Account and Margin | SunX](#trading-account-and-margin-sunx)
- [Risk Reminder | SunX](#risk-reminder-sunx)
- [Take-Profit and Stop-Loss | SunX](#take-profit-and-stop-loss-sunx)
- [Liquidation | SunX](#liquidation-sunx)
- [Funding Rate | SunX](#funding-rate-sunx)
- [Last Price and Index Price | SunX](#last-price-and-index-price-sunx)
- [Trading Rules | SunX](#trading-rules-sunx)
- [Contract Information | SunX](#contract-information-sunx)
- [Security Audit Report | SunX](#security-audit-report-sunx)
- [Staking Rules | SunX](#staking-rules-sunx)
- [Gas-Free Continues: Enjoy a 100% Gas Rebate on Your First TRON Approval | SunX](#gas-free-continues-enjoy-a-100-gas-rebate-on-your-first-tron-approval-sunx)
- [SunX Launches Staking with 12% APY | SunX](#sunx-launches-staking-with-12-apy-sunx)
- [SunX to Adjust APY for Staking Product | SunX](#sunx-to-adjust-apy-for-staking-product-sunx)
- [Refer Friends and Earn Up to 1,500 $SUN Every Day | SunX](#refer-friends-and-earn-up-to-1-500-sun-every-day-sunx)
- [Position Risk Limits | SunX](#position-risk-limits-sunx)
- [Invite Friends to Earn SunX Points and Redeem Them for USDT or an iPhone 17! | SunX](#invite-friends-to-earn-sunx-points-and-redeem-them-for-usdt-or-an-iphone-17-sunx)
- [Refer Friends to Boost Your Earnings: Get 10% Fee Rebate + 10% Bonus! | SunX](#refer-friends-to-boost-your-earnings-get-10-fee-rebate-10-bonus-sunx)
- [SunX Launches Airdrop Giveaway #1 - $5,000,000 for Arbitrum Community | SunX](#sunx-launches-airdrop-giveaway-1-5-000-000-for-arbitrum-community-sunx)
- [SunX's "Trading to Top the Leaderboard" Program for Affiliates Launched! | SunX](#sunx-s-trading-to-top-the-leaderboard-program-for-affiliates-launched-sunx)
- [Join SunX's Affiliate Program Win limited-time +10% bonus & up to $2,888 | SunX](#join-sunx-s-affiliate-program-win-limited-time-10-bonus-up-to-2-888-sunx)
- [Join SunX Futures Trial Bonus Early Bird Program: Invite Friends and Unlock Exclusive Privileges | SunX](#join-sunx-futures-trial-bonus-early-bird-program-invite-friends-and-unlock-exclusive-privileges-sunx)
- [Rewards Worth $1.35 Million Are Here|SunX's Trade to Earn #1 Is Live | SunX](#rewards-worth-1-35-million-are-here-sunx-s-trade-to-earn-1-is-live-sunx)
- [$SUN Buyback Details for "Trade to Earn" Event | SunX](#-sun-buyback-details-for-trade-to-earn-event-sunx)
- [SunX Embarks Anew|Invite Friends and Share 1 Million $SUN | SunX](#sunx-embarks-anew-invite-friends-and-share-1-million-sun-sunx)
- [$1.35M Rewards | Join "Trade to Earn" #2 on SunX | SunX](#-1-35m-rewards-join-trade-to-earn-2-on-sunx-sunx)
- [Dual Rewards for SunX Affiliates,Win a Limited-Time Extra 10% Bonus & Up to $2,800 | SunX](#dual-rewards-for-sunx-affiliates-win-a-limited-time-extra-10-bonus-up-to-2-800-sunx)
- [14 Days Only: Share a Million-Dollar Airdrop for SunX Trial Bonus Launch | SunX](#14-days-only-share-a-million-dollar-airdrop-for-sunx-trial-bonus-launch-sunx)
- [$315,000 Giveaway | Join "Trade to Earn" #3 on SunX | SunX](#-315-000-giveaway-join-trade-to-earn-3-on-sunx-sunx)
- [Referral Program | SunX](#referral-program-sunx)
- [How to get or bind the referral code? | SunX](#how-to-get-or-bind-the-referral-code-sunx)
- [SunX Affiliate Referral Program | SunX](#sunx-affiliate-referral-program-sunx)
- [Quick start | SunX](#quick-start-sunx)
- [Rest | SunX](#rest-sunx)
- [Websocket Subscription | SunX](#websocket-subscription-sunx)
- [Websocket Trading | SunX](#websocket-trading-sunx)
- [Error code | SunX](#error-code-sunx)
- [Media Kit | SunX](#media-kit-sunx)
- [Social Media | SunX](#social-media-sunx)
- [Terms of Service | SunX](#terms-of-service-sunx)
- [Privacy Policy | SunX](#privacy-policy-sunx)
- [Preparation | SunX](#preparation-sunx)
- [Interface Type | SunX](#interface-type-sunx)
- [WebSocket Heartbeat | SunX](#websocket-heartbeat-sunx)
- [Authentication | SunX](#authentication-sunx)
- [Basic Information | SunX](#basic-information-sunx)
- [Account | SunX](#account-sunx)
- [Order Push Heartbeat | SunX](#order-push-heartbeat-sunx)
- [Wallet | SunX](#wallet-sunx)
- [Position | SunX](#position-sunx)
- [Order | SunX](#order-sunx)
- [Market Data | SunX](#market-data-sunx)
- [Private Channel | SunX](#private-channel-sunx)
- [Public Channel | SunX](#public-channel-sunx)
- [Get Deposit & Withdraw records | SunX](#get-deposit-withdraw-records-sunx)
- [Ws Place batch orders | SunX](#ws-place-batch-orders-sunx)
- [Ws Cancel batch Orders | SunX](#ws-cancel-batch-orders-sunx)
- [Subscribe Index Kline Data | SunX](#subscribe-index-kline-data-sunx)
- [Market Heartbeat | SunX](#market-heartbeat-sunx)
- [Get Contract Info | SunX](#get-contract-info-sunx)
- [Get Swap Index Price Information | SunX](#get-swap-index-price-information-sunx)
- [Get Futures Risk Limit | SunX](#get-futures-risk-limit-sunx)
- [Get funding rate | SunX](#get-funding-rate-sunx)
- [Get Swap Price Limitation | SunX](#get-swap-price-limitation-sunx)
- [Get historical funding rate | SunX](#get-historical-funding-rate-sunx)
- [Get information on swap trading fee | SunX](#get-information-on-swap-trading-fee-sunx)
- [Get Account Balance | SunX](#get-account-balance-sunx)
- [Assets Available for Multi-Assets Collateral mode | SunX](#assets-available-for-multi-assets-collateral-mode-sunx)
- [Get trading bills | SunX](#get-trading-bills-sunx)
- [Get Current Position | SunX](#get-current-position-sunx)
- [Cancel Order | SunX](#cancel-order-sunx)
- [Place Order | SunX](#place-order-sunx)
- [Place Multiple Orders | SunX](#place-multiple-orders-sunx)
- [Create a Withdraw Request | SunX](#create-a-withdraw-request-sunx)
- [Set Leverage | SunX](#set-leverage-sunx)
- [Confirm a Withdraw Request | SunX](#confirm-a-withdraw-request-sunx)
- [Get Leverage List | SunX](#get-leverage-list-sunx)
- [Get Position Mode | SunX](#get-position-mode-sunx)
- [Set Position Mode | SunX](#set-position-mode-sunx)
- [Cancel Multiple Orders | SunX](#cancel-multiple-orders-sunx)
- [Cancel All | SunX](#cancel-all-sunx)
- [Close All of a Symbol at Market Price | SunX](#close-all-of-a-symbol-at-market-price-sunx)
- [Get KLine Data | SunX](#get-kline-data-sunx)
- [Get Market Depth | SunX](#get-market-depth-sunx)
- [Get Futures Risk Limit | SunX](#get-futures-risk-limit-sunx)
- [Close All at Market Price | SunX](#close-all-at-market-price-sunx)
- [Get Market BBO Data | SunX](#get-market-bbo-data-sunx)
- [Get Market Data Overview | SunX](#get-market-data-overview-sunx)
---
# Introduction | SunX
USDT-Margined Futures Multi-Assets Collateral API
* The Multi-Assets Collateral mode introduces a groundbreaking way to trade derivatives. It allows users to leverage multiple assets as margin collateral instead of relying on a single asset, improving capital efficiency and mitigating risks.
Advantages of Multi-Assets Collateral Mode for USDT-Margined Futures
* Enhanced Capital Efficiency
* The multi-assets collateral mode enables users to employ various assets—such as USDT, BTC, and ETH—as collateral for futures trading. This flexibility eliminates the reliance on a single asset, like USDT, maximizing the utility of funds across the account.
* Risk Reduction
* By allowing a multi-asset portfolio, the multi-assets collateral mode mitigates the volatility risk associated with a single asset. For instance, if one asset experiences significant price fluctuations, the gains or stability of other assets in the portfolio can help offset potential losses, reducing the likelihood of forced liquidation.
* Lower Cost of Asset Lockup
* With the ability to utilize multiple assets as collateral, you can minimize the risks of locking up a single asset. Dynamic rebalancing of asset allocation becomes feasible, reducing the need for frequent deposits or withdrawals based on market conditions.
* Increased Flexibility
* You can manage your collateral more dynamically. For example, in bullish markets, you may allocate more assets to trading without converting all holdings to USDT. This approach empowers you to adapt your strategies to varying market scenarios.
* Diversified Collateral Assets
* The multi-assets collateral mode allows you to back your positions with diverse assets, even during extreme market volatility or liquidity constraints. This diversification minimizes the risks associated with price swings or liquidity issues in a single asset, bolstering overall portfolio stability.
[](https://sunperp-1.gitbook.io/sunperp-docs/points-and-rewards/invitation-reward)
[PreviousSunX Affiliate Referral Program](https://sunx.gitbook.io/sunx/points-and-rewards/sunx-affiliate-referral-program)
[NextQuick start](https://sunx.gitbook.io/sunx/developer/quick-start)
Last updated 3 months ago
---
# 充值与提现 | 孙悟空
[](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#sun-wu-kong-chong-zhi-yu-ti-xian)
孙悟空— 充值与提现
----------------------------------------------------------------------------------------------------------------
本指南将详细介绍如何在 孙悟空 平台上进行充值与提现操作。文档内容将展示 孙悟空 的实际交互流程,确保您能安全、顺畅地完成资产充值与提现。
###
[](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#chong-zhi)
充值
在开始交易前,您需要先将支持的代币充值到 孙悟空 平台账户中。请严格按照以下步骤操作,以确保充值成功。
####
[](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#bu-zhou-yi-lian-jie-qian-bao)
步骤一:连接钱包
1\. 打开 [孙悟空 官方网站](https://www.sunwukong.io/zh-cn/)
,在页面右上角点击【连接钱包】按钮。

2\. 选择任意一个支持的钱包并完成连接流程。 3. 连接成功后,您的钱包地址将显示在页面顶部。
####
[](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#bu-zhou-er-fa-qi-chong-zhi)
步骤二:发起充值
1\. 点击充值按钮,会弹出【充值】弹窗。

2\. 选择要充值链以及代币(如 USDT)并输入充值金额。

3.若这是您第一次充值 USDT,系统会要求您进行授权操作。
4.点击【授权并充值】按钮,钱包将弹出授权请求。
5.请务必核对授权合约地址是否为 [孙悟空](https://www.sunwukong.io/)
官方地址:
l 官方授权合约地址为:\`TEubMt2TNag5NN1JXVaeysUk8GNTTYmtVX\`

6.在钱包中确认授权交易并等待区块确认完成。
7\. 授权完成后,即会继续进行充值操作,在浏览器钱包中弹出充值的请求。
l 提示:如果您之前已经授权过 USDT 且额度充足,按钮将展示【充值】,自动跳过此授权步骤。
8\. 请仔细检查交易信息,确认无误后签名并提交交易。 9. 等待区块链确认,充值链上确认后,会弹出相关充值中相关的提示。

10\. 交易确认后,您可以在【投资组合】页面查看最新余额。 11. 充值记录可在【详情→ 充值记录】中查看。

####
[](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#chong-zhi-zhu-yi-shi-xiang)
充值注意事项
\- 请确保钱包中有足够的原生代币(如 TRX)用于支付网络 Gas 费用。 - 仅授权并操作官方合约地址,谨防假冒网站或钓鱼链接。 - 充值一旦上链确认后将不可撤销,请仔细核对充值代币及金额。
###
[](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#ti-xian)
提现
提现功能允许您将资产从 孙悟空 平台提回至已连接的钱包中。请按照以下步骤操作:
1\. 打开 [孙悟空官网网站](https://www.sunwukong.io/zh-cn/)
,在页面中点击【提现】按钮。

2\. 选择要提现的代币并输入提现金额。

3\. 钱包将弹出转账请求,请核对信息后点击【确认】提交交易。 4. 等待区块链确认,完成后您将在钱包中看到到账资产。 5. 所有提现记录可在【详情→ 提现记录】中查看。

####
[](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#ti-xian-zhu-yi-shi-xiang)
提现注意事项
\- 请确保接收地址支持您提现的代币类型。 - 若网络拥堵,交易确认时间可能会延长,请耐心等待。
###
[](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#quan-ping-tai-ti-xian-xian-e)
全平台提现限额
孙悟空 平台设有统一的全平台提现额度限制: - 全平台每小时可处理的总提现额度上限为 2,000,000 美元。 该限制为全平台级别限制,并非针对单个用户账户。
###
[](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#chang-jian-wen-ti-yu-gu-zhang-pai-cha)
常见问题与故障排查
\- 充值未到账:请先在区块链浏览器确认交易是否成功上链,若已确认,请刷新页面或前往【充值记录】查看更新。 - 提现延迟:区块链网络拥堵可能导致确认时间延长,请耐心等待并通过浏览器查询状态。 - Gas 不足:请确保钱包中有足够的原生代币(如 TRX)用于支付网络手续费。 - 错误代币充值:若您误充不支持的代币,资金可能永久丢失,请务必核实后再操作。
###
[](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#an-quan-cao-zuo-jian-yi)
安全操作建议
\- 仅通过 孙悟空 官方域名([https://www.sunwukong.io/zh-cn/](https://www.sunwukong.io/zh-cn/)
)访问平台并进行充值或提现。 - 在钱包中确认交易时,务必核实交易信息与目标地址。 - 授权时仅确认官方合约地址:\`TEubMt2TNag5NN1JXVaeysUk8GNTTYmtVX\`。 - 切勿向任何人透露您的助记词、私钥或验证码。 - 定期更新钱包应用与浏览器版本,确保使用安全环境。
[上一页钱包连接](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie)
[下一页孙悟空答网友问](https://sunx.gitbook.io/sunx-cn/ru-men/sun-wu-kong-da-wang-you-wen)
最后更新于1个月前
* [孙悟空— 充值与提现](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#sun-wu-kong-chong-zhi-yu-ti-xian)
* [充值](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#chong-zhi)
* [提现](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#ti-xian)
* [全平台提现限额](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#quan-ping-tai-ti-xian-xian-e)
* [常见问题与故障排查](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#chang-jian-wen-ti-yu-gu-zhang-pai-cha)
* [安全操作建议](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian#an-quan-cao-zuo-jian-yi)
---
# 钱包连接 | 孙悟空
[](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#sun-wu-kong-qian-bao-lian-jie)
孙悟空 — 钱包连接
----------------------------------------------------------------------------------------------------------
本文档将指导您在 孙悟空 平台上安全地连接钱包。介绍 孙悟空 平台 实际交互流程以帮助您快速理解钱包连接的具体步骤和注意事项。
###
[](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#kuai-su-gai-lan)
快速概览
1)打开 [孙悟空 平台](https://www.sunwukong.io/zh-cn/)
→ 2)点击【连接钱包】 → 3)选择支持的钱包 → 4)签署消息 → 5)连接成功
###
[](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#qian-zhi-tiao-jian)
前置条件
\- 请先安装并准备好任意一个支持的钱包(连接弹窗中会显示当前支持的五种钱包)。 - 确保钱包插件或移动端应用已解锁。 - 连接钱包本身不会产生 Gas 费用;只有在后续进行链上交易时才会产生网络费用。
###
[](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#lian-jie-qian-bao)
连接钱包
1\. 打开 孙悟空 官方网站,在页面右上角找到【连接钱包】按钮。

2\. 点击【连接钱包】后,会弹出包含五个钱包选项的弹窗。

3\. 根据您的钱包类型,参考以下方式完成连接流程:
• \*\*浏览器扩展钱包\*\*(如 TronLink 等): - 请确认浏览器已启用对应的钱包插件。 - 当系统提示授权连接至 [孙悟空 官方站点](https://www.sunwukong.io/zh-cn/)
时,请点击【确认】。 - 钱包会弹出签名请求窗口,请仔细阅读签名内容,确认无误后完成签名。
• \*\*移动端或扫码类钱包\*\*(例如通过二维码连接): - 点击弹窗中对应选项后,将显示一个二维码。 - 打开您的手机钱包应用并扫描该二维码。 - 在钱包内确认连接请求并完成签名操作。
4\. 签名成功后,您的钱包地址将显示在页面顶部。孙悟空 平台在连接过程中无需选择链或网络。

###
[](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#guan-yu-deng-lu-qian-ming-xiao-xi)
关于登录签名消息
孙悟空 平台 会向您发送一次性签名请求,以验证钱包的所有权并建立安全的登录会话。此签名操作仅用于身份验证,不会授权任何资产操作权限,也不会消耗 Gas 费用。请务必核对签名信息和域名是否为 [孙悟空官方域名](https://www.sunwukong.io/zh-cn/)
后再进行签名确认。
###
[](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#yan-zheng-lian-jie-yu-qie-huan-zhang-hu)
验证连接与切换账户
\- 钱包连接成功后,您的钱包地址将显示在页面顶部。

\- 若需切换账户,请先在钱包中切换当前账户,然后在 孙悟空 页面中点击【断开连接】→再点【连接钱包】重新登录。

\- 若系统再次弹出签名请求,请重新签名以刷新登录状态。
###
[](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#gu-zhang-pai-cha)
故障排查
\- 钱包未检测到:请确认您已正确安装并启用了钱包插件,并关闭可能产生冲突的其他钱包插件。 - 连接弹窗未出现:请刷新页面并确保浏览器未阻止弹窗。 - 签名失败:请解锁钱包,检查系统时间是否准确,然后重试。如问题仍存在,请断开连接后重新尝试。 - 连接了错误账户:请在钱包内切换至正确账户后,重新连接 孙悟空。
[上一页介绍](https://sunx.gitbook.io/sunx-cn)
[下一页充值与提现](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian)
最后更新于1个月前
* [孙悟空 — 钱包连接](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#sun-wu-kong-qian-bao-lian-jie)
* [快速概览](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#kuai-su-gai-lan)
* [前置条件](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#qian-zhi-tiao-jian)
* [连接钱包](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#lian-jie-qian-bao)
* [关于登录签名消息](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#guan-yu-deng-lu-qian-ming-xiao-xi)
* [验证连接与切换账户](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#yan-zheng-lian-jie-yu-qie-huan-zhang-hu)
* [故障排查](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie#gu-zhang-pai-cha)
---
# 介绍 | 孙悟空
孙悟空 是波场(TRON)链上首家顶级配置的去中心化永续合约交易平台,致力于为用户提供机构级的交易体验与极致安全的资产保障。我们深度融合全链流动性、零 Gas 交易与智慧型风控机制,重新定义高效、便捷与可靠的 DeFi 衍生品交易。
平台核心优势
· 深度聚合流动性:无缝集成多链顶级流动性来源,支持大额资产极速成交,近乎零滑点,交易体验流畅如 CEX。
· 极速交易性能:毫秒级订单匹配与高性能 API,结合智能链上路由技术,响应迅速、操作丝滑,不错失任何行情机会。
· 零 Gas 费架构:独创链下执行与链上结算混合模型,用户交易无需支付 Gas 费用,显著降低频繁交易成本。
多重智慧风控:创新防插针机制与多源预言机实时报价,有效规避异常市场波动带来的意外风险,为资金安全全程护航。
[下一页钱包连接](https://sunx.gitbook.io/sunx-cn/ru-men/qian-bao-lian-jie)
最后更新于28天前
---
# 孙悟空答网友问 | 孙悟空
孙悟空答网友问2025.11.27
**79、全民空投的领取条件是什么?**
用户需已在Hyperliquid平台使用Arbitrum链地址注册,连接孙悟空后完成100u以上的交易,即可领取空投奖励。
**78、交易挖矿0手续费,是不扣手续费吗?**
交易时系统会正常扣除手续费,但您在领取挖矿奖励时将获得107%–110%的返还,实际相当于0手续费交易。
**77、交易挖矿为什么Maker的奖励更高?**
由于Maker订单能为平台提供流动性,提升交易深度并降低滑点,因此孙悟空设置了更高的激励比例,奖励可达110%。
**76、交易挖矿的手续费会回购销毁SUN代币?**
是的。平台会将全部手续费收入用于回购并销毁$SUN,每日回购数量均会公示,您也可在交易挖矿页面查看累计已回购数量。回购后销毁将每季度进行。
**75、交易挖矿需要先报名再交易才算吗?**
是的。您需要先完成报名,之后交易BTC、ETH或SUN,只要在当期挖矿进度达到100%之前,即可获得相应挖矿奖励。
孙悟空答网友问2025.11.25
**74、什么是交易挖矿活动?**
交易挖矿是孙悟空平台推出的限时激励活动。活动期间,您交易指定合约交易对,不仅可享受0手续费优惠,还能额外获得SUN代币奖励。交易越多,奖励越多。
**73、交易挖矿的奖励怎样计算?**
挖矿奖励 = 手续费 × 加成系数。其中,Maker订单加成系数为110%,Taker订单加成系数为107%。例如,若您支付100 USDT手续费,Maker订单可获得110 USDT等值的SUN奖励,Taker订单可获得107 USDT等值的SUN奖励。
**72、交易哪些代币能获得挖矿奖励?**
目前支持交易挖矿奖励的交易对包括:BTC/USDT、ETH/USDT、SUN/USDT。
**71、怎样参加交易挖矿活动?**
您只需在交易挖矿页面完成报名,随后交易指定交易对即可参与。请注意,每日及每小时的奖励池设有上限,若该周期奖池已挖完,则不再有挖矿奖励,您可活动页面查看挖矿进度。
**70、USDT质押如果我2-3天没领,收益会消失吗?**
收益不会消失。您可选择每日领取或累积多日后集中领取,但建议每日领取,以便让收益参与复利计算,实现收益最大化。
孙悟空答网友问2025.11.12
**69、之前的交易记录怎么查不到了?**
目前孙悟空平台仅支持查询最近30天内的交易记录。
**68、我用的欧易钱包,授权时的费用是给了欧易还是孙悟空?**
授权操作属于链上交易,相关费用由对应公链网络收取,并非由钱包服务商或孙悟空平台收取。例如使用波场链钱包时费用由波场网络收取,使用以太坊钱包时则由以太坊网络收取。
**67、如果用能量首次授权充值100u,有10个TRX奖励吗**?
若首次使用能量代理完成授权并充值100 USDT以上,可获得3个TRX的奖励。
**66、我充值时扣了10.36 TRX的费用,是谁收取了这个费用?**
该笔费用为链上转账所需的网络手续费,由波场TRON网络直接收取。若您满足首次授权且充值金额达到100 USDT以上,平台将为您返还10个TRX。
**65、怎样从孙悟空平台提现?**
连接您的个人钱包后,在平台首页右上方点击“充值”按钮,进入页面后选择“提现”即可操作。
孙悟空 答网友问2025.11.6
**64、我是新手,我应该用哪个钱包玩孙悟空,最好手机和电脑都能支持?**
如果您是初次使用去中心化钱包,推荐使用波场官方钱包TronLink,其兼容性和操作体验最佳。您可在tronlink.org下载安装,支持手机与电脑端同步使用。
**63、使用非波场链钱包地址充值后怎么领取SUN代币呢?**
通过非波场链钱包充值的用户仍可正常领取SUN迎新奖励,但由于SUN代币未在其他公链发行,目前暂不支持提取至非波场钱包。我们正在设计跨链解决方案,敬请留意后续公告。
**62、邀请奖励需要手动领取还是自动发放?**
手续费返佣奖励将于T+1日自动发放至您的账户,无需操作。迎新活动的邀请奖励需您主动前往“迎新盛典”页面手动领取。
**61、孙悟空 有自己的TGE叙事吗?**
孙悟空 平台目前没有发行新代币(TGE)的计划,平台官方代币为$SUN。
**60、质押USDT年化收益变成7%了吗?**
随着平台资金规模突破7700万美元,USDT质押年化收益已调整为阶梯式结构:基础收益为7%,若账户余额≥1万U且当日交易额≥资金规模的30%,可额外获得3%奖励,合计年化可达10%。相比行业平均水平,孙悟空 的收益率仍具备明显优势。
孙悟空 答网友问2025.11.5
**59、孙悟空 不实名怎么把U换成法币呢?**
孙悟空 作为去中心化合约交易平台,并不提供法币兑换服务。您可将USDT转入火币HTX交易所,然后再通过C2C交易将USDT换成法币。
**58、孙悟空 官方账号TG号有哪些?**
孙悟空 官方TG账号如下:@Sunx\_Vivian、@mysticalwave、@sayonaraudin、@Sunxbd、@ILoveyouEveryUniverss、@Nickky\_77、@Web3Donny、@PlusJhon、@jakolbhing、@Gdongdong、@nfree1125、@xiaoshuai\_945、@alyx\_Sunx、@Jevon\_Sunx、@joy\_Sunx。以上账号均为孙悟空 官方认证的社群管理员或客服人员。建议您优先通过官方公共频道联系,若需私信沟通,请务必通过上述认证账号进行身份确认,谨防仿冒账号。
**57、我用谷歌添加钱包扩展了,为什么提示未检测到钱包,要先登录钱包吗?**
目前孙悟空 支持MetaMask、Binance Wallet、OKX Wallet、Bitget Wallet、TokenPocket以及TronLink共六款主流钱包,请确保安装的钱包来自官方渠道。连接前需先登录并解锁钱包,若仍未检测到,建议重启浏览器或检查钱包是否已正确启用。
**56、SUN的回购销毁什么时候开始?**
SUN代币的回购销毁机制自2022年3月启动以来持续运行,至今已累计销毁648,535,242.90枚SUN。最新完成的第四十八期销毁数量为2,060,843.918枚SUN,其中通过SunSwap V2收入回购销毁362,655,328.09枚,通过SunPump收入回购销毁285,879,914.81枚。关于孙悟空 平台收入用于SUN回购销毁的具体方案正在制定中,敬请关注官方后续公告。
孙悟空 答网友问2025.10.29
**55、我填了一亿美金补贴申请,为什么一直没有收到回复?**
抱歉让您久等了,当前申请人数较多,我们正在加紧审核,还请您耐心等待。
**54、充值时提示可用TRX不足怎么办?**
孙悟空 为去中心化链上合约交易平台,充值为链上操作需要支付一定的Gas费。如果提示TRX不足,建议您向个人钱包转入一些TRX作为日常链上操作费用。
**53、VIP等级怎样提升?**
VIP等级由近30天的累计交易量决定,交易量越高,等级则越高。例如,当交易量达到5亿美元时,即可升级为SVIP4,并享受低至0.015%的Taker手续费。您可随时在交易页面右侧点击“交易费率”,查看各级别的具体交易量要求及对应的手续费标准。
**52、孙悟空 当前的预言机和保险基金政策什么?**
孙悟空 采用多交易所数据源作为预言机报价,确保价格稳定。保险基金功能目前已在规划中,未来将采用与主流交易平台相同的保险机制,具体方案请留意后续公告。
孙悟空答网友问2025.10.27
**51、我提交了“同舟计划”申请,补偿金什么时候能到账?**
您提交申请并收到确认邮件后,即代表申请成功。补贴将一次性发放至您的孙悟空 补贴账户,您通过交易即可逐步解锁USDT补贴,且该补贴无解锁期限限制。具体可查看平台公告。
**50、充值BNB有SUN奖励吗?**
目前充值BNB暂无奖励。首次充值100 USDT或以上,可获得70枚SUN奖励。
**49、孙悟空 有哪几个官网?**
孙悟空 现有三个官方网址:[sunwukong.io](http://sunwukong.io/)
、[swk.io](http://swk.io/)
和 [sunx.io](https://sunx.io/)
。华语用户推荐访问 [sunwukong.io](http://sunwukong.io/)
或 [swk.io](http://swk.io/)
,海外用户可使用 [sunx.io](https://sunx.io/)
。
**48、后续会考虑联合保证金模式吗?**
目前平台暂仅支持USDT作为保证金,联合保证金功能已在规划中,具体上线时间请关注官方后续公告。
**47、我把USDT存入孙悟空 后,会不会因为平台风控、监管要求或系统异常被冻结或限制提取?**
孙悟空 采用链上去中心化质押机制,您的USDT始终保存在您个人控制的钱包中,平台不会冻结或限制您的资产。
孙悟空 答网友问2025.10.23
**46、哪个钱包的兼容性最好,一定要用TronLink吗?**
孙悟空 平台兼容多种主流钱包,包括MetaMask、Binance Wallet、OKX Wallet、Bitget Wallet、TokenPocket以及TronLink,以上六款钱包均可顺畅使用,您可根据偏好自由选择,不限于TronLink。
**45、在孙悟空 平台上,每笔交易都需要支付Gas费吗?**
在孙悟空 平台进行合约交易无需支付Gas费,您仅需按实际成交类型支付相应的交易手续费。
**44、买卖手续费是多少**?
当前开仓与平仓的Maker手续费为0.015%,Taker手续费为0.04%。此外,在10月21日11:00至11月3日24:00期间,所有Maker订单均享受0手续费优惠,不设金额限制。
**43、质押USDT是无风险收益吗?**
孙悟空 平台提供的USDT质押收益本身为无风险收益。但不排除USDT本身价格波动、网络攻击等系统性风险。
**42、Maker订单的交易量不计入交易排行榜吗?**
是的,目前交易排行榜仅统计产生手续费(即手续费大于0)的交易,因此Maker订单在活动期间由于手续费为0,暂不计入排名。
孙悟空 答网友问2025.10.22
**41、交易排行榜每天几点结束统计?**
交易排行榜的统计周期为每日00:00至23:59(UTC+8)。
**40、从BSC链充值USDT能拿到质押的利息收益吗?**
可以的。无论您从波场、以太坊、BSC还是Arbitrum链充值USDT至孙悟空 平台,均可享受质押收益,具体年化收益率请前往质押页面查看。
**39、请问除波场以外的链怎么提现SUN呢?**
SUN代币原生发行于波场TRON链,所有支持波场链的钱包均可提现,其他链不支持提现SUN。
**38、质押发放的收益币种是USDT还是SUN,另外质押是需要存放在平台还是在自己的钱包里面?**
质押收益将以USDT+其他代币形式组合发放,具体规则可前往质押页面查看。获得该收益需将USDT充值至孙悟空 平台,但资产仍由您个人控制,可随时免费提现,且不影响合约交易操作。
**37、听说5万USDT以上能申请20%年化,有这回事么?**
平台会不定期进行限时加息活动,您可联系大客户专属BD,申请更高年化收益,具体金额和利率以沟通为准。
孙悟空 答网友问2015.10.21
**36、我看到充值有返10个TRX,用能量的话,也是可以返的吧?**
1. 您 孙悟空 累计充值≥100U,可享首次 Approve Gas 费100%返还,即10 TRX。 费用将采取“链上先扣除、平台后补贴”的形式,按以下时间发放至您的账户。
2. 能量代理支付认证手续费用户,限时礼遇,返还3 TRX。
**35、交易手续费活动有吗?**
有的。10月21日-11月3日期间,孙悟空 推出挂单(Maker)0手续费活动,不限订单大小与交易量,所有挂单交易均享受0手续费优惠。
**34、电脑上网页版需要梯子吗?**
访问sunwukong.io以及连接钱包无需使用梯子,但若需从谷歌应用商店安装钱包插件,访问商店时需使用梯子。
**33、现在都可以在哪些交易所购买SUN?官方合约地址是哪个?**
SUN代币目前已上线超过60家交易所,官方波场链合约地址为:TSSMHYeV2uE9qYH95DqyoCuNCzEL1NvU3S。
**32、有私钥钱包都支持吗?钱包里面有U在网站上安全度高吗?使用钱包导入U的保障性有没有?**
目前孙悟空 支持波场、以太坊、BSC、Arbitrum四条公链及六种主流钱包,更多公链及钱包正在陆续添加中。您的资产始终保存在个人钱包中,平台不托管资金,请务必妥善保管私钥与助记词,并谨慎进行合约授权。若因平台原因造成资产丢失,我们会承担相应责任。
孙悟空 答网友问2025.10.20
**31、我的账号被误风控了,怎么解除风控?**
请将您的钱包地址和相关风控截图发送至 support@sunx.com,我们收到邮件后将尽快为您核实处理。
**30、孙悟空 能开多少倍杠杆?**
孙悟空 平台目前最高支持100倍杠杆。
**29、手续费用TRX,那个SUN代币有什么用?**
我们正在规划SUN代币的整体赋能方案,未来可能包括使用手续费销毁SUN等机制,具体安排请关注后续官方公告。
**28、同舟共济怎么搞?**
在10月11日黑天鹅事件期间,在任意DEX上爆仓金额≥50美元的用户,均可申请孙悟空 的“同舟计划”。具体请访问孙悟空 官方推特 @sunwukong\_DEX,通过置顶推文中的申请表单提交信息。
**27、Staking会每天自动进行复利吗?**
目前暂不支持自动复利功能,每日的质押收益需要您手动领取,领取后即可实现复利累积。
孙悟空 答网友问2025.10.17
**26、怎么连接我自己的钱包?**
建议您使用谷歌浏览器访问孙悟空 官网 (sunwukong.io),并在浏览器右上角扩展程序中安装支持的钱包(如TronLink),登录钱包后返回页面即可连接。目前孙悟空 支持波场、以太坊、BSC、Arbitrum四条公链及六种主流钱包。若您尚未使用过钱包,请访问tronlink.org安装钱包插件,注册个人钱包后连接孙悟空 即可开始交易。(注:操作需使用VPN联网)
**25、质押有什么保障么,如果我放40万u被攻击了有赔偿么?**
孙悟空 质押为链上去中心化操作,您的资产始终保存在个人钱包中,平台无法控制或转移。我们仅接入经安全审计的合约并持续监控以降低风险,但区块链仍存在合约漏洞等不可预知的风险,请妥善保管钱包并谨慎授权。若因孙悟空 平台原因导致资产丢失,我们会承担相应责任。
**24、1亿美金是真给么,不会是体验金吧?**
“1亿美金同舟计划”真实有效,所有补贴均以USDT发放。在10月10日8:00至10月12日7:59期间,只要您在全网任何DEX的爆仓金额超过50U,即可申请最高5000U的补贴。成功获得资格后,您在孙悟空 平台进行交易即可解锁对应奖励,交易越多解锁越多,具体解锁比例请留意后续公告。报名通道现已开启,可立即申请。
**23、下单时怎样设置止盈止损?**
目前暂不支持在下单时同步设置止盈止损,您需要先完成交易并持仓,随后在持仓页面中为相应仓位设置止盈或止损。
孙悟空 答网友问2025.10.16
**22、使用OKX钱包充值有Gas返还么?**
有的。只要您使用支持波场链的钱包(包括OKX钱包),在首次授权连接孙悟空 平台并充值不少于100U,授权时支付的TRX手续费将全部返还。连接钱包时,您可选择波场链并查看支持的钱包列表。
**21、10月14日充值了USDT,哪天能收到质押收益呢?**
收益发放规则如下:每日0点,孙悟空 会对前一日账户内的USDT余额进行快照,并于T+1日17:00发放对应收益。例如,如果您在14日充值,15日0点将进行快照,收益将在16日17:00到账。
**20、年化12%的收益有额度限制么?**
目前没有额度限制,孙悟空 欢迎广大链上用户参与并享受高收益。如有调整,我们将通过官方公告及时通知,请留意孙悟空 质押页面的相关信息。
**19、年化收益是固定的还是动态的?**
目前12%的年化收益为固定收益,无额度上限,也无奖励上限,您可以放心参与。
孙悟空 答网友问2025.10.15
**18、连接钱包时显示No wallet yet怎么办?**
请先确认浏览器中已安装对应钱包插件(如TronLink),若已安装但仍无法识别,可尝试清除浏览器缓存并刷新页面后重新连接。
**17、100% Gas返还是什么意思?**
首次连接波场链钱包并授权时需支付Gas费(TRX扣除),对于首次充值100u以上的用户,孙悟空 平台将100%返还该笔费用至您的授权钱包,其中9.17-9.30期间授权的用户将于10.15-10.17返还,10.1-10.15期间授权的用户将于10.31-11.2返还。
**16、我怎么没找到注册入口?**
孙悟空 平台无需注册,只需连接个人去中心化钱包(如TronLink)即可交易;若尚未安装钱包,请访问tronlink.org安装插件并创建钱包后再连接孙悟空 。
**15、孙悟空 现在有什么奖励活动么?**
孙悟空 平台现有多个大力度奖励活动,包括首次授权充值≥100u享0 Gas费、充值USDT享12%年化收益、邀请好友每日最高可得1500枚SUN代币等,欢迎访问sunwukong.io了解详情。
孙悟空 答网友问2025.10.14
**14、邀请返佣怎么开?**
所有孙悟空 用户均可参与邀请返佣。具体操作如下:使用电脑访问 sunwukong.io,连接钱包后,点击页面上方的“邀请好友”,将生成的专属邀请链接分享给好友。好友通过该链接完成钱包连接后,即建立了邀请返佣关系。
**13、我怎么把HTX里的钱转到孙悟空 ?**
孙悟空 平台不托管用户资产,用户只需连接个人去中心化钱包即可进行交易。操作步骤:首先安装 TronLink 钱包,将您在 HTX 的资产(如 USDT、TRX、SUN)转入 TronLink,然后连接孙悟空 平台即可开始交易。
**12、上线代币到孙悟空 有什么要求?**
我们欢迎所有优质项目前来合作。如有上币需求,请直接联系官方客服进行沟通与对接。
**11、孙悟空 的后续发展有规划吗?**
感谢您对孙悟空 平台的关注!我们将于 10 月 16 日 晚 20:00 再次邀请孙哥,通过官方 Space 与大家实时交流孙悟空 后续的发展规划,欢迎准时参与。
孙悟空 答网友问2025.10.13
**10、邀请奖励是给现金还是给平台币,是即时发放么?**
邀请奖励以USDT形式发放,发放时间为次日。
**9、在哪里下载孙悟空 交易平台?**
孙悟空 平台无需下载,PC端用户可直接访问官网sunwukong.io进行交易。APP版本目前正在开发中,上线后会第一时间通知大家。
**8、质押就是账户里有USDT就行了是吧,其他币种有奖励么?**
是的,只需孙悟空 账户中有USDT即可参与质押,无需锁仓或冻结,同时不影响合约交易。目前仅支持USDT享受12%年化收益,后续将考虑支持其他热门币种。
**7、SUN到底是不是孙悟空 平台的核心代币?**
是的,SUN是孙悟空 平台的核心代币,目前平台暂无发行新币或平台币的计划。
**6、为什么设置不了止盈止损?**
您可在持仓后于“持仓”区域进行设置。
孙悟空 答网友问2025.10.11
**5、什么是孙悟空 ?**
孙悟空 是一个中文合约交易平台,是波场TRON链上首个永续合约DEX。
**4、怎样下载孙悟空 手机app和电脑vp端软件?**
答:APP已在加紧开发中,您目前可通过电脑访问官网sunwukong.io进行交易。
**3、现货交易后续会上线么?**
答:现货交易我们还在考虑中,请留意官方消息。
**2、孙悟空 您好,大陆客户怎么注册?**
答:您好,孙悟空 无需注册,全球用户都可以通过去中心化钱包连接孙悟空 平台。(根据网络环境,连接钱包时可能需要连接VPN)
**1、孙悟空 发新币吗,哪个是平台币?**
答:孙悟空 不会发行新币,平台币即$SUN。
[上一页充值与提现](https://sunx.gitbook.io/sunx-cn/ru-men/chong-zhi-yu-ti-xian)
[下一页自动减仓(ADL)](https://sunx.gitbook.io/sunx-cn/jiao-yi/zi-dong-jian-cang-adl)
最后更新于15天前
---
# 自动减仓(ADL) | 孙悟空
自动减仓(Auto-Deleveraging,简称ADL)
1. 机制概述
自动减仓(ADL)是指在极端行情或不可抗力因素导致风险准备金不足或急速下降时,为控制系统性风险所采取的一种对手方强制平仓机制。所谓“急速下降”,指在1、2、4或8小时内,风险准备金自峰值直线下降达到预设阈值。具体阈值因交易币对而异,平台后续亦可能根据市场状况及用户权益保障原则进行调整。
1. 运行方式
ADL触发后,平台不再以挂单撮合方式处理强平强减仓位,而是直接与对手方排序最 靠前的账户成交。成交后,对手方相应合约仓位被消减,该部分收益将转为账户可用 余额。
请注意,ADL成交价格可能超出合约市场实时价格范围。我们强烈建议用户密切关注“ 自动减仓指示器”显示的优先级,以尽量避免成为对手方。
1. 对手方排序规则
ADL对手方排序综合考虑账户(或仓位)风险水平及合约仓位收益率,具体规则如下:
【全仓模式】
* 盈利仓位:杠杆收益 = 仓位收益率 / 账户保证金率
* 亏损仓位:杠杆收益 = 仓位收益率 × 账户保证金率
收益率越高、仓位保证金率越低的账户,越容易被列为ADL对手方,自动减仓风险也越高。
1. 风险提示与用户查询 用户可通过页面信号灯实时查看自动减仓风险等级:
* 5格全亮:排序靠前,风险极高
* 仅1格亮:排序靠后,风险较低
如被自动减仓,用户将收到短信及邮件通知,内容包括被减仓位及成交价格。用户也可在“订单中心”页面查询该记录,账单类型标注为“自动减仓”。
[上一页孙悟空答网友问](https://sunx.gitbook.io/sunx-cn/ru-men/sun-wu-kong-da-wang-you-wen)
[下一页标记价格](https://sunx.gitbook.io/sunx-cn/jiao-yi/biao-ji-jia-ge)
最后更新于2个月前
---
# 风险提示 | 孙悟空
一、流动性风险
指无法顺利开仓或平仓的风险。
* 涉及方:交易者、做市商
二、资金费率风险
指因资金费用方向改变或费率上升而可能导致的潜在损失。
* 涉及方:交易者、做市商
三、市场风险
指因标的资产价格变动可能造成损失的风险。
* 涉及方:交易者、做市商、流动性提供者
四、智能合约风险
指因智能合约漏洞可能导致资金损失的风险。
* 说明:孙悟空 虽经过严格测试与审计,但仍处于测试阶段,可能存在未被发现的漏洞,存在被攻击风险。核心智能合约不可升级,用户需自行承担使用风险。
五、做市商风险
指因做市商不活跃或恶意操作导致协议无法正常运行而造成的损失。
* 风控措施:做市商经严格筛选且需质押代币,违规操作可能导致质押代币被大幅削减。
* 涉及方:交易者、做市商、流动性提供者
六、价格偏差保护风险
指提交市价单后、交易确认前,因市场价格波动可能导致的损失。
* 机制说明:所有交易均按预言机价格执行,不对市场造成价格影响,但此期间的价格波动风险由交易者承担。
七、LP流动性风险
指当资金池使用率较高时,流动性提供者(LP)可能无法提取资金的风险。
* 涉及方:流动性提供者
八、网络稳定性风险
指因网络中断或拥堵导致无法开仓/平仓/清算、无法铸造/销毁流动性代币等操作而造成的损失。
* 涉及方:交易者、做市商、流动性提供者
[上一页订单类型](https://sunx.gitbook.io/sunx-cn/jiao-yi/ding-dan-lei-xing)
[下一页关于强平价](https://sunx.gitbook.io/sunx-cn/jiao-yi/guan-yu-qiang-ping-jia)
最后更新于1个月前
---
# 关于强平价 | 孙悟空
关于强平机制与价格说明
一、价格类型说明
1. 最新价格(Last Price)
2. 指该合约最近一次成交的价格,用于计算已实现盈亏(Realized PnL)。
3. 标记价格(Mark Price)
根据资金费率及多家现货交易所的一篮子价格综合计算得出,用于计算未实现盈亏(Unrealized PnL)和触发强平。
1. 风险水平和杠杆率根据强平系数动态调整:头寸越大,所需保证金越高,可用杠杆越低。
二、强平触发条件
当保证金率 ≤ 0% 时,系统将触发强制平仓(清算),以控制损失并维护平台稳定。
保证金计算公式:
* 初始保证金 = 合约面值 × 持仓数量 / 开仓价格 / 杠杆倍数
* 持仓保证金 = 开仓均价 × 张数 × 面值 / 杠杆
避免强平建议:
当风险率接近100%时,可通过追加保证金或减少仓位规模来降低风险。
三、强平价格
强平在标记价格达到强平价格时触发。持续监控标记价格与强平价格的差距,是防止意外清算的关键。
* 全仓模式下,同一合约的多头与空头仓位共享同一强平价格。
四、强平流程
1. 系统检测到保证金率 ≤ 0% 时,自动启动强平;
2. 账户中所有未成交订单将被立即取消;
3. 根据头寸规模和风险水平,可能启动部分清算机制,以降低全部清算风险。
五、补充说明
* 仓位规模与清算方式:
* 小仓位因保证金缓冲有限,更可能被全额清算;
* 大仓位适用保证金分级制度,清算过程相对渐进,风险控制更灵活。
* 建议操作:
在接近维持保证金门槛前,建议手动平仓,以避免强制清算产生的额外费用。
* 负余额处理:
若清算后账户出现负余额,需自行转入资金补足至正余额。
[上一页风险提示](https://sunx.gitbook.io/sunx-cn/jiao-yi/feng-xian-ti-shi)
[下一页交易手续费](https://sunx.gitbook.io/sunx-cn/jiao-yi/jiao-yi-shou-xu-fei)
最后更新于2个月前
---
# 标记价格 | 孙悟空
一、什么是标记价格?
合约标记价格是一个通过特定算法计算得出的理论公允价格,并非交易所订单簿中显示的实时交易价格。其核心目标是尽可能准确反映标的资产的真实市场价值,避免因单一交易所流动性不足或市场操纵行为导致价格异常。
* 市场价格:用户实际开仓和平仓的成交价,由本交易所订单簿最新成交决定,波动较为剧烈。
* 标记价格:系统用于计算用户持仓盈亏和判断是否触发强平的记账价格,走势相对平滑、更具公允性。
二、标记价格的计算方法
标记价格采用通用算法,主要参考以下两大要素:
1. 现货指数价格
作为标记价格的计算基础,系统会综合多家全球主流、高流动性且可信赖的大型交易所的现货价格。
1. 资金费率(适用于永续合约)
永续合约通过资金费率机制使合约价格紧跟现货价格。具体表现为:
1. 市场看多时,多头向空头支付资金费;
2. 市场看空时,空头向多头支付资金费。
标记价格在计算中会融入资金费率的预期,从而更精准地锚定现货指数价格。
1. 合成算法
标记价格取以下三项的中位数:
1. 资金费率基差合理价格
2. 深度加权合理价格
3. EMA最新价
特殊情况处理:
1. 若其中一项价格不参与计算(开关关闭),则标记价格 = 剩余两项的平均值,即 (a + b) / 2;
2. 若其中两项不参与计算,则标记价格直接取剩余一项的价格。
三、标记价格的核心作用
标记价格主要用于风险控制,具体体现在以下三个方面:
1. 防止恶意爆仓(防“爆仓狙击”)
若仅以流动性有限的市场价格作为强平依据,大户可能通过短期砸盘或拉盘操纵价格,触发大量用户爆仓并从中获利。标记价格基于多家主流交易所现货价格合成,难以被单一力量操纵,从而有效保护普通交易者,增强强平机制的公平性。
1. 公平计算未实现盈亏
用户持仓的浮动盈亏基于标记价格计算,避免因单所价格异常导致盈亏剧烈波动。计算公式为:
未实现盈亏 = (标记价格 - 开仓均价) × 合约数量
该方式更能反映仓位的真实市场价值,过滤短期市场噪音。
1. 作为强平触发的基准
系统根据标记价格计算保证金率和强平价格。仅当标记价格触及强平线时,才会执行强制平仓。这意味着即使本地市场价格发生剧烈波动,只要标记价格未达到强平阈值,用户就不会被爆仓。
[上一页自动减仓(ADL)](https://sunx.gitbook.io/sunx-cn/jiao-yi/zi-dong-jian-cang-adl)
[下一页订单类型](https://sunx.gitbook.io/sunx-cn/jiao-yi/ding-dan-lei-xing)
最后更新于2个月前
---
# 订单类型 | 孙悟空
永续合约订单类型说明
永续合约交易提供6种订单类型:市价委托、限价委托、只做Maker(Post-Only)、计划委托、跟踪委托和分时委托。
一、限价委托
限价委托允许用户以指定价格或更优价格挂单。该订单不保证成交,仅在市场价格达到设定价格时执行:
* 买入限价委托:以限价或更低价格成交
* 卖出限价委托:以限价或更高价格成交
二、市价委托
市价委托按当前市场最优价格立即成交:
* 仅需指定合约类型和数量,成交价格由订单簿流动性决定
* 所有时间和执行条件均为系统预设,保证执行但无法指定价格
三、计划委托
计划委托需预先设置触发条件、委托价格和数量。当最新成交价达到触发价时,系统自动按设定参数下单:
* 支持限价委托和市价委托两种模式,遵循现有交易规则
* 触发前不冻结资产,触发后冻结对应资产
* 可能因价格限制、余额不足、系统异常等原因触发失败
* 触发后可能因市场波动无法成交:
* 限价委托按设定价格挂单,成交取决于市场价格
* 市价委托按当前市场价执行,成交取决于流动性
四、只做Maker
该订单仅作为挂单(Maker),不会立即成交:
* 若订单会与现有挂单立即成交,则自动取消
* 确保用户始终作为流动性提供者(Maker)
五、跟踪委托
跟踪委托用于在行情回调时自动下单:
* 设定激活条件和回调比例,满足条件后以指定价格下限价委托订单
* 典型场景:下跌反弹时买入,冲高回落时卖出
六、分时委托
分时委托通过分批下单优化成交均价,减少市场冲击:
* 适用于大额订单、稳健建仓/平仓或规避择时需求
* 参数配置:
* 总数量:目标买入/卖出总量
* 委托方式:限价委托(指定价格)或市价委托(最优市价)
* 拆分规则:
* 按期数拆分(如分20期)
* 按单笔数量拆分(如每笔2张合约)
* 时间间隔:每两笔委托的间隔时间(如30秒、1分钟)
* 有效期:策略总执行时长或直至全部成交
[上一页标记价格](https://sunx.gitbook.io/sunx-cn/jiao-yi/biao-ji-jia-ge)
[下一页风险提示](https://sunx.gitbook.io/sunx-cn/jiao-yi/feng-xian-ti-shi)
最后更新于2个月前
---
# 交易手续费 | 孙悟空
用户在进行交易的时候,平台会收取一定的交易手续费,收取的手续费会计入已实现盈亏中。无论开仓还是平仓,收取的手续费都是USDT。
如BTC/USDT永续合约收取的手续费为USDT。收取的手续费(或Maker返还的手续费),会计入已实现盈亏中。下单不会冻结手续费,手续费在成交之后收取。
手续费 = 成交合约张数 \* 合约面值 \* 成交均价 \* 费率
USDT本位永续合约交易费率:
开仓手续费: Maker 手续费:0.015% ;Taker 手续费: 0.04%
平仓手续费: Maker 手续费:0.015% ;Taker 手续费: 0.04%
例1:用户在BTC/USDT永续合约价格为5000 USDT开 200 张多仓(合约面值为0.001BTC),并按Taker全部成交,过几天后价格上涨,又选择在6000 USDT价格挂单全部卖出,并且全部成交, 则
开仓手续费为200 \* 0.001 \* 5000 \* 0.04% = 0.4 USDT
平仓手续费为200 \* 0.001 \* 6000 \* 0.015% = 0.18 USDT
例2:用户在ETH/USDT永续合约价格为400 USDT开 200 张多仓(合约面值为0.01ETH),并按Taker全部成交,过几天后价格上涨,又选择在480 USDT价格挂单全部卖出,并且全部成交, 则
开仓手续费为200 \* 0.01 \* 400 \* 0.06% = 0.36 USDT
平仓手续费为200 \* 0.01 \* 480 \* 0.02% = 0.144 USDT
提示:
1.以上费率仅供示例用途。实际费率参考《费率》
2.挂单(Maker)是您所下的限价单并未与当前挂单成交,并被放在买卖盘中等待成交的摆单,它增加了买卖盘的流动性。
3.当其他人的摆单主动与您所下的摆单成交,您将支付挂单交易手续费。
4.吃单(Taker)是您所下的限价单或市价单与当前的挂单直接成交。
5.当您所下的摆单主动与其他人的摆单成交,您将支付吃单交易手续费。
6.负费率指无需收取其交易手续费,且实时返还其该笔交易手续费。
[上一页关于强平价](https://sunx.gitbook.io/sunx-cn/jiao-yi/guan-yu-qiang-ping-jia)
[下一页交易账户和保证金](https://sunx.gitbook.io/sunx-cn/jiao-yi/jiao-yi-zhang-hu-he-bao-zheng-jin)
最后更新于2个月前
---
# 交易账户和保证金 | 孙悟空
1.保证金模式和交易账户
(1)全仓账户: 孙悟空 允许交易账户内的所有仓位共享保证金。
(2)逐仓账户:暂时不提供逐仓订单交易服务,后续版本加入。
2.清算
有关清算过程,参考《清算》
3.保证金
在虚拟合约市场上,用户只需根据合约价格,按一定比例交纳少量资金作为履行合约的财力担保,便可参与合约的买卖,这种资金就是虚拟合约保证金。用户在开仓后,该合约账户内持仓所需的保证金,会随着最新成交价的变化而变化。
全仓账户的保证金模式:
孙悟空 支持 USDT 作为交易的主要保证金。全仓账户中的USDT为每个全仓模式下的合约类型品种仓位提供担保,即全仓模式下,永续合约和交割合约的所有品种合约的仓位共享一个账户权益,账户中的盈亏、占用保证金、保证金率等数据合并计算。
比如用户B在USDT合约全仓模式下同时持有永续合约BTC和ETH仓位,以及当周合约BTC仓位,那么全仓账户中的资产都会为这三个合约(BTC永续合约、ETH永续合约、BTC当周合约)的仓位提供担保,保证金率共同计算。当USDT本位全仓合约的保证金率>100%时,用户的永续合约BTC和ETH的仓位,及当周合约的BTC仓位,则都可能会触发强平。
注:孙悟空 暂不支持逐仓模式,请期待后续版本更新。
保证金的计算
持仓保证金 = 持仓合约价值 / 倍数
例1:买入开多500USDT的BTC/USDT合约,最新成交价为5000USDT/BTC,倍数为10,则持仓保证金 = 500 / 10 = 50 USDT
例2:买入开多500USDT的 ETH/USDT合约,最新成交价为500USDT/ETH ,倍数为10,则持仓保证金 = 500 / 10 = 50 USDT
4.双向持仓保证金优化
为提高用户的资产利用率,减少用户的持仓占用保证金,当在相同模式相同品种下用户持有双向合约时,USDT本位合约实行锁仓保证金优化方案,使用优化方案后将会减免部分持仓保证金,公式如下:
持仓保证金 = 多仓持仓保证金 + 空仓持仓保证金 - 锁仓保证金 \* 锁仓保证金的优惠比例;
持仓保证金= 合约面值 \* 持仓合约数量 \* 最新成交价 / 倍数
锁仓保证金 = min ( 多仓持仓保证金,空仓持仓保证金 )
注:全仓模式的新持仓保证金(账户)= 所有支持全仓的品种合约的新持仓保证金之和
[上一页交易手续费](https://sunx.gitbook.io/sunx-cn/jiao-yi/jiao-yi-shou-xu-fei)
[下一页清算机制](https://sunx.gitbook.io/sunx-cn/jiao-yi/qing-suan-ji-zhi)
最后更新于1个月前
---
# 资金费用 | 孙悟空
一、资金费用概述
资金费用是一种旨在使永续合约价格与现货市场价格保持一致的机制。该费用定期在多头与空头持仓者之间交换,以激励合约价格向现货价格收敛。
* 资金费用每小时在多空双方之间支付一次,具体方向由实时变动的资金费率决定。
* 仅在结算时刻持有仓位的用户,才需支付或接收资金费用。
* 资金费用根据结算时的仓位价值计算,公式为:
资金费用 = 仓位数量 × 指数价格 × 资金费率
* 资金费率更新频率因币种而异,常见间隔为1、2、4或8小时。
二、资金费率计算
资金费率由以下两部分组成:
资金费率(F) = 平均溢价指数(P) + Clamp(利率(I)− 平均溢价指数(P),0.05%,−0.05%)
若(I - P)处于±0.05%范围内,则 F = I,即资金费率等于利率。
1\. 利率(I)
公式:
利率(I)=(报价利率指数 − 基准利率指数)/ 资金费率间隔
* 报价利率指数:借入报价货币的利率
* 基准利率指数:借入基础货币的利率
* 资金费率间隔 = 24 / 资金费用结算间隔(小时)
2\. 平均溢价指数(P)
公式:
溢价指数(P)= \[Max(0, 影响买入价 − 指数价格) − Max(0, 指数价格 − 影响卖出价)\] / 指数价格
* 影响买入价:达到影响保证金名义值(IMN)的买入方平均成交价
* 影响卖出价:达到影响保证金名义值(IMN)的卖出方平均成交价
* 影响保证金名义值(IMN):衡量订单簿深度,用于确定计算溢价指数时所参考的订单规模
平均溢价指数(P)通过每分钟采样并进行N小时时间加权平均(TWAP)计算得出(N为资金费率间隔)。越接近结算时刻,数据权重越高。
以4小时间隔(N=4)为例,P的计算为:
(溢价指数a × 2 + 溢价指数b × 2 + ... + 溢价指数n×240) / (1 + 2 + ... + 240)
三、计算过程说明
系统每分钟计算一次利率(I)和溢价指数(P),并在结算前按N小时周期进行时间加权平均。最终资金费率(F)在平均值基础上引入±0.05%的阻尼机制以平缓波动。
结算时,资金费率(F)将应用于每个持仓的价值,从而确定用户应付或应得的资金费用。
[上一页止盈止损](https://sunx.gitbook.io/sunx-cn/jiao-yi/zhi-ying-zhi-sun)
[下一页最新价格、指数价格和标记价格](https://sunx.gitbook.io/sunx-cn/jiao-yi/zui-xin-jia-ge-zhi-shu-jia-ge-he-biao-ji-jia-ge)
最后更新于2个月前
---
# 清算机制 | 孙悟空
一、账户保证金率计算
保证金率 =(仓位规模 × 平均持仓价格 × 维持保证金率)÷ 仓位净资产
其中,
仓位净资产 = 保证金 + 未实现盈亏 + 资金费用 – Taker手续费
二、维持保证金
维持保证金是指维持头寸不被清算所需的最低抵押金额。
计算公式:
维持保证金 = 持仓规模(币种)× 平均持仓价格 × 维持保证金率
三、清算触发条件
当仓位保证金率 ≤ 维持保证金率(即保证金率上升至100%或更高)时,系统将自动触发强制平仓流程。
* 清算在单个区块内完成,无价格偏差风险。
四、清算后处理
平仓完成后,剩余保证金将划入风险准备金。
风险准备金用于弥补极端行情中、头寸清算后损失超出初始保证金(即“爆仓”或“穿透保证金”)时造成的平台账户亏损。
五、附加说明
* 爆仓/穿透保证金:
指市场剧烈波动导致仓位损失超过用户初始保证金的情形。
* 风险准备金的作用:
作为平台重要的风控机制,用于应对极端市场情况,弥补穿仓损失,维护系统稳定性和整体安全。
[上一页交易账户和保证金](https://sunx.gitbook.io/sunx-cn/jiao-yi/jiao-yi-zhang-hu-he-bao-zheng-jin)
[下一页止盈止损](https://sunx.gitbook.io/sunx-cn/jiao-yi/zhi-ying-zhi-sun)
最后更新于1个月前
---
# 最新价格、指数价格和标记价格 | 孙悟空
一.最新价格
最新价格代表合约的最新交易价格,实时更新并显示在订单簿中。该指标对于进行日内交易和剥头皮交易策略的交易者至关重要,因为它反映了最新的市场活动。最新价格能够即时洞察当前交易状况,使交易者能够根据最新数据及时做出决策。也称为“标记价格”或“市价”,指的是该合约在当前交易所的订单簿中,最近一笔成交交易的价格。
主要用途:
显示当前的市场行情。
用于已实现盈亏的计算(即已平仓仓位产生的盈亏)
二.指数价格
指数价格是计算出来的公允价格。指数价格源自多家主流加密货币交易所收集的价格加权平均值。这些权重每四小时动态调整一次,以与这些平台的波动保持一致。利用指数价格可以帮助用户规避特定交易所的异常波动,从而有利于波段交易。值得注意的是,该汇总价格主要用于计算资金费用,确保整个市场的资金费率公平。
主要用途:
用于计算未实现盈亏(即持仓的浮动盈亏)。
作为强平(清算)的触发基准。只有当指数价格达到你的强平价格时,才会被清算,这有效防止了因本交易所市场价格被恶意操纵而导致的“恶意爆仓”。
三.标记价格
合约标记价格是一个通过特定算法计算得出的理论公允价格,并非交易所订单簿中显示的实时交易价格。其核心目标是尽可能准确反映标的资产的真实市场价值,避免因单一交易所流动性不足或市场操纵行为导致价格异常。
* 市场价格:用户实际开仓和平仓的成交价,由本交易所订单簿最新成交决定,波动较为剧烈。
* 标记价格:系统用于计算用户持仓盈亏和判断是否触发强平的记账价格,走势相对平滑、更具公允性。
1、标记价格的计算方法
标记价格采用通用算法,主要参考以下两大要素:
(1)现货指数价格
作为标记价格的计算基础,系统会综合多家全球主流、高流动性且可信赖的大型交易所的现货价格。
(2)资金费率(适用于永续合约)
永续合约通过资金费率机制使合约价格紧跟现货价格。具体表现为:
1. 市场看多时,多头向空头支付资金费;
2. 市场看空时,空头向多头支付资金费。
标记价格在计算中会融入资金费率的预期,从而更精准地锚定现货指数价格。
(3)合成算法
标记价格取以下三项的中位数:
1. 资金费率基差合理价格
2. 深度加权合理价格
3. EMA最新价
特殊情况处理:
1. 若其中一项价格不参与计算(开关关闭),则标记价格 = 剩余两项的平均值,即 (a + b) / 2;
2. 若其中两项不参与计算,则标记价格直接取剩余一项的价格。
2、标记价格的核心作用
标记价格主要用于风险控制,具体体现在以下三个方面:
(1)防止恶意爆仓(防“爆仓狙击”)
若仅以流动性有限的市场价格作为强平依据,大户可能通过短期砸盘或拉盘操纵价格,触发大量用户爆仓并从中获利。标记价格基于多家主流交易所现货价格合成,难以被单一力量操纵,从而有效保护普通交易者,增强强平机制的公平性。
(2)公平计算未实现盈亏
用户持仓的浮动盈亏基于标记价格计算,避免因单所价格异常导致盈亏剧烈波动。计算公式为:
未实现盈亏 = (标记价格 - 开仓均价) × 合约数量
该方式更能反映仓位的真实市场价值,过滤短期市场噪音。
(3)作为强平触发的基准
系统根据标记价格计算保证金率和强平价格。仅当标记价格触及强平线时,才会执行强制平仓。这意味着即使本地市场价格发生剧烈波动,只要标记价格未达到强平阈值,用户就不会被爆仓。
[上一页资金费用](https://sunx.gitbook.io/sunx-cn/jiao-yi/zi-jin-fei-yong)
[下一页交易规则](https://sunx.gitbook.io/sunx-cn/jiao-yi/jiao-yi-gui-ze)
最后更新于2个月前
---
# 止盈止损 | 孙悟空
止盈止损指的是,预先设置触发条件(止盈价或止损价)和委托价格的平仓单,当最新成交价格达到事先设定的触发价格时,系统将按提前设置好的委托价和数量下达平仓订单到市场,从而达到止盈或止损的目的。目前,止盈止损单有两种下单方式:
开仓时设置止盈止损:用户可以下达开仓限价单时,提前为仓位设置止盈单或止损单,或同时设置止盈单和止损单。当该开仓限价单成交时(部分成交或全部成交),系统会以用户预设的触发价格和委托价格来立即委托止盈止损单。
持仓时设置止盈止损:用户可以在持仓时为指定仓位设置止盈单或止损单,或同时设置止盈和止损。设置完成后,当市场最新成交价格达到触发条件时,系统将按提前设置好的委托价和数量下达平仓限价单到市场上。
[上一页清算机制](https://sunx.gitbook.io/sunx-cn/jiao-yi/qing-suan-ji-zhi)
[下一页资金费用](https://sunx.gitbook.io/sunx-cn/jiao-yi/zi-jin-fei-yong)
最后更新于2个月前
---
# 合约信息 | 孙悟空
TRON:[TEubMt2TNag5NN1JXVaeysUk8GNTTYmtVX](https://tronscan.org/#/contract/TEubMt2TNag5NN1JXVaeysUk8GNTTYmtVX/code)
ETH:[0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7](https://etherscan.io/address/0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7)
BSC:[0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7](https://bscscan.com/address/0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7)
ARB:[0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7](https://arbiscan.io/address/0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7)
SOLANA:[9s435W1x3Gm9tG5zbRGhFtov6v2wKdzUXEfsdsiPd4Rz](https://solscan.io/account/9s435W1x3Gm9tG5zbRGhFtov6v2wKdzUXEfsdsiPd4Rz)
[上一页阶梯限仓的梯度仓位](https://sunx.gitbook.io/sunx-cn/jiao-yi/jie-ti-xian-cang-de-ti-du-cang-wei)
[下一页安全审计报告](https://sunx.gitbook.io/sunx-cn/he-yue/an-quan-shen-ji-bao-gao)
最后更新于15天前
---
# 关于孙悟空质押产品年化利率调整的公告 | 孙悟空
尊敬的用户:
孙悟空 平台将于2025年11月3日起调整质押产品年化利率至10%,由两部分年化利率组成,详情如下:
1、7%基础年化利率,无任何门槛要求,账户内有USDT资产即可参与,收益以USDT形式由系统自动发放;
2、3%加息年化利率,需要同时满足以下两个条件即可享受:
l 当日USDT资沉金额≥10,000 USDT
l 当日合约交易额≥当日USDT资沉金额的30%
该加息年化收益将以TRX代币形式,前期由人工在15个工作日内进行发放,后续将支持系统自动发放。
新规则将于11月3日正式生效,11月3日之前的收益不受影响。后续如有变动,将另行通知,请留意平台最新公告。
_\*11月4日快照3日USDT资沉金额,5日将按照新的年化利率规则发放3日的质押收益_
孙悟空 团队
[上一页邀请好友赚「悟空积分」,兑换USDT、iPhone17!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/yao-qing-hao-you-zhuan-wu-kong-ji-fen-dui-huan-usdtiphone17)
[下一页邀请好友,赚取10%手续费返现和返佣!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/yao-qing-hao-you-zhuan-qu-10-shou-xu-fei-fan-xian-he-fan-yong)
最后更新于1个月前
---
# 邀请好友,每日赚最高 1,500 枚$SUN | 孙悟空
尊敬的孙悟空 用户,
齐天大圣集结令已发,号召同伴入阵!邀请好友完成交易,即可获得最高300枚$SUN;每日上限 1,500枚$SUN。
**活动时间:**10月13日18:00 - 10月23日17:59 (UTC+8)
**如何参与邀请?**
**1\. 获取邀请链接:**打开孙悟空 官网连接钱包,进入【邀请好友】获取专属链接/邀请码
**2\. 分享给好友:**将链接或邀请码发送给好友;好友通过邀请链接连接钱包,或在【绑定邀请人】处添加您的邀请码
**3\. 获得奖励:**好友完成交易任务,你和好友即可领取奖励
[详细教程点这里>>](https://sunperp.gitbook.io/sunperp-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma)
**活动规则:**
活动期间,邀请好友完成任务,每名用户每日最高可赚1,500枚$SUN。
**● 首充达标礼**
受邀好友首次充值≥100 USDT,你得70枚$SUN,每人每日最高400枚$SUN。
**● 首单达标礼**
受邀好友首单交易额≥100 USDT,你得100枚$SUN,TA得50枚$SUN。
**● 7日达标礼**
受邀好友7 天内累计交易额≥20,000 USDT,你再得200枚$SUN。
\*以上奖励可叠加计算;首充达标礼请前往[【迎新盛典】](https://www.sunwukong.io/zh-cn/futures/airdrop/)
页面领取,并且不计入每日1,500枚SUN奖励中;首单达标礼和7日达标礼将在活动结束后发放。
[**立即邀请**](https://www.sunwukong.io/zh-cn/futures/invite/)
**注意事项:**
● 受邀好友仅计算活动期间首次连接钱包的用户。若用户在绑定邀请码前已完成首充或交易则不计算在内。
● 首单达标礼和7日达标礼奖励将于活动结束后 14个工作日内统一发放至孙悟空 账户中。
● 禁止自成交/对敲、同资金源批量互邀、脚本化秒开秒平等,命中将无法获得奖励。
● 若发现恶意刷量、对倒等行为,将取消奖励资格。
● 本活动最终解释权归孙悟空 所有。
感谢您的支持与信任,期待您的参与!
孙悟空 团队
2025年10月13日
[上一页孙悟空重磅上线质押,轻松赚取12% APY](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/sun-wu-kong-zhong-bang-shang-xian-zhi-ya-qing-song-zhuan-qu-12-apy)
[下一页邀请好友赚「悟空积分」,兑换USDT、iPhone17!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/yao-qing-hao-you-zhuan-wu-kong-ji-fen-dui-huan-usdtiphone17)
最后更新于1个月前
---
# 邀请好友赚「悟空积分」,兑换USDT、iPhone17! | 孙悟空
尊敬的用户:
**邀请即挖矿!**
来孙悟空 邀请好友,赚取悟空积分,兑换 **USDT、iPhone17** 等超值大奖。邀请好友比直接购买iPhone17还要轻松!
活动时间:10月31日18:00 - 11月6日 23:59(UTC+8)
**如何参与?**
1\. 复制邀请链接:登录孙悟空,前往【[邀请好友](https://www.sunwukong.io/zh-cn/futures/invite/)
】页面复制邀请链接
2\. 邀请好友:好友通过链接注册并完成任务,你和好友均可获得积分
3\. 提交邀请码:将您的孙悟空 邀请码填写至表单中,方可累计积分([点此提交](https://forms.gle/kojpATQYZuzDVU4G9)
)
4\. 积分更新:每日21:00(UTC+8)前通过谷歌表格公示邀请积分
**邀请积分奖励规则:**
邀请好友注册、充值、交易、持仓等任务,均可获得积分,每位用户最多可获得 3,000积分。
[\>>点此提交邀请码](https://forms.gle/kojpATQYZuzDVU4G9)
任务
邀请人积分
受邀好友积分
邀请1名好友注册
+5
+5
邀请1名好友充值100 USDT
+5
+5
邀请1名好友交易100 USDT
+25
+25
好友持仓时长≧24小时
+30
+30
**积分兑换规则:**
积分将在活动结束后根据用户达到的最高档位发放。活动奖池共计50,000 USDT,若超出总奖池则按积分排名优先分配。
积分
奖励
100积分
5 USDT
500积分
50 USDT
2,000积分
iPhone17或 1,000 USDT(二选一)
**每日邀请积分排名(21:00 UTC+8前更新):**
[\>>点此查看排名](https://docs.google.com/spreadsheets/d/1_qzm3sSwrd43k3dAtyTaBglbYuwPFlwNs5cUR0pyiGY/edit?usp=sharing)
**活动说明:**
● 活动最终解释权归 孙悟空 平台所有。
● 持仓任务按照持仓时长统计,持仓达标即可获得积分。
● 受邀好友仅计算活动期间首次连接钱包的用户。若用户在绑定邀请码前已完成首充或交易则不计算在内。
● 活动奖励将于活动结束后 14个工作日内统一发放至 孙悟空 账户中。
● 禁止自成交/对敲、同资金源批量互邀、脚本化秒开秒平等,命中将无法获得奖励。
● 若发现恶意刷量、对倒等行为,将取消奖励资格。
● 本活动最终解释权归 孙悟空 所有。
感谢您的支持与信任,期待您的参与!
孙悟空 团队
2025年10月31日
[上一页邀请好友,每日赚最高 1,500 枚$SUN](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/yao-qing-hao-you-mei-ri-zhuan-zui-gao-1500-mei-sun)
[下一页关于孙悟空质押产品年化利率调整的公告](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/guan-yu-sun-wu-kong-zhi-ya-chan-pin-nian-hua-liltiao-zheng-de-gong-gao)
最后更新于1个月前
---
# 【0 Gas继续享】Tron链首次Approve,Gas费100%返还! | 孙悟空
由您开启,为您延续。感应社区用户的热烈呼声,“Gas费全免”活动福利惊喜返场,助您继续体验0 Gas的流畅交易。
如何领回Gas费?
活动时间:2025年10月16日 - 随时截止(以官方后续公告为准)
活动规则:
1. 您 孙悟空 累计充值≥100U,可享首次 Approve Gas 费100%返还,即10 TRX。 费用将采取“链上先扣除、平台后补贴”的形式,按以下时间发放至您的账户。
2. 能量代理支付认证手续费用户,限时礼遇,返还3 TRX。
TRX 返还时间表
期数
首次 Approve授权时间
补贴时间
发放状态
1
9/17 - 9/30
10/15 - 10/17
已发放 10TRX/人
2
10/1 - 10/15
10/31 - 11/2
已发放 10TRX/人
3
10/16 - 10/31
11/15 - 11/17
已发放 10TRX/人
4
11/1-11/15
11/30-12/2
待发放
5
11/16起
\-
24小时内自动返还至个人账户
注意:
1. 仅支持Tron链,其他链不参与补贴活动。
2. 由于网络及手续费波动,实时返gas功能延迟上线。11.1日起参与活动用户返奖时间,请参考上方表格。
3. 若发现恶意攻击、脚本化刷量等行为,将取消奖励资格。
4. 本活动最终解释权归孙悟空 所有。
别再犹豫,立即参与!
0 Gas 轻松交易,这份诚意我们为您延续!
孙悟空 团队
[上一页安全审计报告](https://sunx.gitbook.io/sunx-cn/he-yue/an-quan-shen-ji-bao-gao)
[下一页质押规则](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/zhi-ya-gui-ze)
最后更新于1个月前
---
# 安全审计报告 | 孙悟空
智能合约:[Security Audit Report](https://github.com/slowmist/Knowledge-Base/blob/master/open-report-V2/smart-contract/Sunperp%20Dex%20-%20SlowMist%20Audit%20Report.pdf)
Sunperp 审计报告: [SOLANA](https://github.com/slowmist/Knowledge-Base/blob/master/open-report-V2/smart-contract/solana-smart-contract/sunperp-sol-vault%20-%20SlowMist%20Audit%20Report.pdf)
[上一页合约信息](https://sunx.gitbook.io/sunx-cn/he-yue/he-yue-xin-xi)
[下一页【0 Gas继续享】Tron链首次Approve,Gas费100%返还!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/0-gas-ji-xu-xiang-tron-lian-shou-ci-approvegas-fei-100-fan-huan)
最后更新于15天前
---
# 质押规则 | 孙悟空
**产品规则:**
1、如何才能获取收益,是否支持随存随取?
质押是根据您孙悟空 平台账户中的USDT资产进行快照计算收益。您只需保持在平台账户中有USDT资产即可。
且质押功能不会影响您正常交易,也不影响您的充提操作,支持随时转入转出资产。
2、如何获得质押收益及收益由哪些币种组成?
通过持有/提升您孙悟空平台账户中的USDT资产净权益获得收益,质押收益目前由7%的基础年化利率及3%的交易加息年化利率组成,其中7%的基础年化收益暂以USDT形式发放,3%的交易加息年化收益暂以TRX代币形式发放,可随时领取至平台账户
3、质押收益的计算规则?
T日质押收益计算规则:T+1日取T日24小时随机快照进行收益计算,T+2日17点之后(UTC+8)发放T日质押收益(存入当日不享受质押收益) 举例:用户在1月1日存入1万USDT,1月3日将取2日USDT资产的24小时随机快照用于计算收益,收益将于1月4日17点之后(UTC+8)发放
4、如何获得额外的3%年化收益?
如您账户内当日USDT快照金额≥10,000 USDT,且当日合约交易额≥当日USDT资沉金额的30%,即可额外享3%年化收益,奖励暂以TRX代币形式发放,前期暂由人工在15个工作日内发放,后续将支持系统自动发放
5、如何查询收益记录
质押主页-可领取收益模块,点击“详情”按钮,即可查询系统每日核算发放的收益流水
6、收益发放哪些币种?
当前所有参与币种,在您手动操作领取收益之后,都会以USDT形式打入您的平台账户中。
7、当前支持币种有哪些?
质押仅支持USDT资产参与,具体可参与币种请参考质押主页展示的币种列表。
8、收益上限是多少?
当前USDT无收益上限
收益上限非固定参数,平台可能存在动态调整的情况,调整参数将不另行公告。
[上一页【0 Gas继续享】Tron链首次Approve,Gas费100%返还!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/0-gas-ji-xu-xiang-tron-lian-shou-ci-approvegas-fei-100-fan-huan)
[下一页孙悟空重磅上线质押,轻松赚取12% APY](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/sun-wu-kong-zhong-bang-shang-xian-zhi-ya-qing-song-zhuan-qu-12-apy)
最后更新于1个月前
---
# 孙悟空重磅上线质押,轻松赚取12% APY | 孙悟空
尊敬的用户:
为回馈广大用户的支持,孙悟空 已正式上线质押产品。用户在孙悟空 平台账户中的USDT资产将享受12%的年化收益,无需手动开启,无冻结无锁仓,同时不影响正常合约交易。
质押当前仅限USDT资产参与,可享受12%的年化收益且收益金额无上限。后续孙悟空 平台可能存在动态调整质押支持的币种、对应币种年化收益及收益金额上限的情况,具体请前往质押主页了解详情。 感谢您的支持与信任,我们期待您的积极参与!
孙悟空 团队 2025年10月01日
[上一页质押规则](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/zhi-ya-gui-ze)
[下一页邀请好友,每日赚最高 1,500 枚$SUN](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/yao-qing-hao-you-mei-ri-zhuan-zui-gao-1500-mei-sun)
最后更新于1个月前
---
# 邀请好友,赚取10%手续费返现和返佣! | 孙悟空
尊敬的用户:
邀请即赚,手续费返现+返佣加码等你来拿!只需邀请好友注册并完成交易,您和好友将双双获享高额奖励,赚得更轻松!
活动时间:11月11日00:00 - 11月18日 23:59(UTC+8)
**如何参与?**
● **复制邀请链接:**登录孙悟空,前往【邀请好友】页面,复制专属邀请链接。
● **邀请好友:**通过您的邀请链接,邀请好友注册并完成交易任务。
● **享受奖励:**您和您的好友均可根据交易情况获得手续费返现和额外返佣。
[\>>点此提交邀请码](https://forms.gle/TUN5mqXcQryMoQ3y7)
**奖励规则:**
邀请好友注册并完成200 USDT交易,您和好友均可获得以下奖励:
● **邀请1名及以上好友:**
○ 自身交易,享5%手续费返现
○ 好友交易,在原返佣比例基础上加码5%,即15%+5%=20%
● **邀请3名及以上好友:**
○ 自身交易,享10%手续费返现
○ 好友交易,在原返佣比例基础上加码10%,即15%+10%=25%
● 好友将获得5%的手续费返现奖励
**活动说明:**
● 手续费返现根据邀请人自身的实际支付的手续费计算;返佣加码根据好友的手续费计算;
● 受邀好友仅计算活动期间首次连接钱包的用户。若用户在绑定邀请码前已完成首充或交易则不计算在内。
● 活动奖励将于活动结束后 14个工作日内统一发放至孙悟空 账户中。
● 禁止自成交/对敲、同资金源批量互邀、脚本化秒开秒平等,命中将无法获得奖励。
● 若发现恶意刷量、对倒等行为,将取消奖励资格。
● 本活动最终解释权归孙悟空 所有。
感谢您的支持与信任,期待您的参与!
孙悟空 团队
2025年11月10日
[上一页关于孙悟空质押产品年化利率调整的公告](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/guan-yu-sun-wu-kong-zhi-ya-chan-pin-nian-hua-liltiao-zheng-de-gong-gao)
[下一页双十一剁手了?别慌,孙悟空“回血计划”启动! 限时加佣10%,最高领取$2,888现金奖励!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/shuang-shi-yi-duo-shou-le-bie-huang-sun-wu-kong-hui-xue-ji-hua-qi-dong-xian-shi-jia-yong-10-zui-gao)
最后更新于1个月前
---
# 孙悟空重磅发布:$5,000,000$ 空投计划 #1:Arbitrum专场! | 孙悟空
孙悟空品牌升级特别推出 $5,000,000$ 空投计划,首期活动回馈Arbitrum生态中的用户。奖励丰厚,等你来领!最高可领取 $50,000 奖励
**一、活动时间**
· 活动开启时间: 2025 年 11 月 20 日 20:00 (UTC+8)
· 空投查询截止: 2026 年 01 月 20 日 00:00 (UTC+8)
· 活动持续时间: 60 天
**二、空投资格查询**
· 空投资格:本期空投仅针对Arbitrum链上钱包地址
· 如何查询资格: 请访问孙悟空官方活动页面,输入您的钱包地址进行查询
**三、活动参与步骤**
符合空投资格的用户,只需简单两步即可领取空投奖励:
**第1步:领取基础奖励**
1\. 连接钱包: 在活动页面连接您符合资格的Arbitrum钱包地址。
2\. 完成首交: 在孙悟空任意交易对完成一笔累计100 USDT 等值的交易。
3\. 领取奖励: 交易完成后,请查完活动页面领取( $2- $300)空投奖励
**第2步:领取进阶奖励**
1\. 持续交易: 在活动期间,持续在孙悟空进行交易。
2\. 奖励计算: 您的进阶奖励额度将根据您的活动期间累计交易量计算。
3\. 上不封顶: 进阶奖励额度不同,交易越多奖励越大,最高奖励上限为 $50,000
**四、注意事项:**
1.奖励类型:本次活动所有奖励均以USDT形式发放;
2.发放时间:完成指定任务要求即可领取奖励;
3.奖励有效期:活动结束后奖励无法领取,请及时根据活动时间领取奖励
4.反作弊机制:台将对任何恶意刷量、对敲交易、自我交易行为进行严格监控。一经发现,平台有权取消其所有空投资格。
5.最终解释权:孙悟空保留对本次活动规则的最终解释权。
本次未获得空投资格的用户,保持期待,下一期马上就来!
[上一页孙悟空合约体验金早鸟计划:邀请好友,抢先体验四重早鸟特权](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/sun-wu-kong-he-yue-ti-yan-jin-zao-niao-ji-hua-yao-qing-hao-you-qiang-xian-ti-yan-si-chong-zao-niao-t)
[下一页孙悟空KOL「交易冲刺计划」重磅启动,月月领$10,000奖励!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/sun-wu-kong-kol-jiao-yi-chong-ci-ji-hua-zhong-bang-qi-dong-yue-yue-ling-10000-jiang-li)
最后更新于1个月前
---
# 交易规则 | 孙悟空
交易对
最小变动价
合约面值(每张)
单笔最大开仓数量
单笔最大平仓数量
单笔最大先平后开仓量
AAVE-USDT
0.001
0.1
17000
17000
17000
ADA-USDT
0.000001
10
59000
59000
59000
ARB-USDT
0.0001
1
1000000
1000000
1000000
ASTER-USDT
0.0001
1
100000
100000
100000
AVAX-USDT
0.0001
1
20000
20000
20000
BCH-USDT
0.01
0.01
83000
83000
83000
BNB-USDT
0.001
0.1
6000
6000
6000
BTC-USDT
0.1
0.001
43000
43000
43000
BTT-USDT
1.00E-09
1000000
170000
170000
170000
CRV-USDT
0.0001
1
650000
650000
650000
DOGE-USDT
0.000001
100
43000
43000
43000
ENA-USDT
0.0001
1
670000
670000
670000
ETH-USDT
0.01
0.01
120000
120000
120000
FARTCOIN-USDT
0.00001
1
670000
670000
670000
HYPE-USDT
0.001
0.1
110000
110000
110000
JST-USDT
0.000001
10
330000
330000
330000
LDO-USDT
0.0001
1
420000
420000
420000
LINK-USDT
0.0001
0.1
220000
220000
220000
LTC-USDT
0.01
0.1
42000
42000
42000
PENDLE-USDT
0.0001
1
65000
65000
65000
PENGU-USDT
0.000001
100
31000
31000
31000
PUMP-USDT
0.000001
100
210000
210000
210000
SEI-USDT
0.0001
1
1000000
1000000
1000000
SOL-USDT
0.0001
0.1
49000
49000
49000
SPX-USDT
0.0001
1
90000
90000
90000
SUI-USDT
0.0001
1
150000
150000
150000
SUN-USDT
0.000001
100
250000
250000
250000
SUNDOG-USDT
0.00001
100
30000
30000
30000
TON-USDT
0.0001
0.1
1600000
1600000
1600000
TRUMP-USDT
0.001
0.1
590000
590000
590000
TRX-USDT
0.000001
100
10000
10000
10000
UNI-USDT
0.0001
1
53000
53000
53000
USDT
0.0001
1
WIN-USDT
1.00E-08
10000
200000
200000
200000
XRP-USDT
0.00001
10
34000
34000
34000
ZORA-USDT
0.00001
10
140000
140000
140000
[上一页最新价格、指数价格和标记价格](https://sunx.gitbook.io/sunx-cn/jiao-yi/zui-xin-jia-ge-zhi-shu-jia-ge-he-biao-ji-jia-ge)
[下一页阶梯限仓的梯度仓位](https://sunx.gitbook.io/sunx-cn/jiao-yi/jie-ti-xian-cang-de-ti-du-cang-wei)
最后更新于2个月前
---
# 双十一剁手了?别慌,孙悟空“回血计划”启动! 限时加佣10%,最高领取$2,888现金奖励! | 孙悟空
活动时间:2025年11月11日00:00--2025年11月20日23:59
参与对象:孙悟空KOL
参与方式:[联系您的商务经理,或直接报名参与](https://forms.gle/ArmUssP9Z54yPo3j6)
。
双十一后“元气大伤”?别慌!孙悟空速效「回血丹」来了,助你资产“满血复活”!
**【加佣回血丹】首月佣金加5%!**
活动期间,成为孙悟空的KOL,即可享受“首月限时加佣5%”的专属福利!
**【拉新回血丹】限时加佣5%+好友立得$11**
KOL专享:活动期间,邀请好友注册交易,限时加佣5%!
好友专享:KOL每邀请1个有效好友,该好友获得$11,每位KOL仅限前20名邀请的好友可领取!先到先得!
\*有效好友: 活动期间,通过您的孙悟空专属链接/邀请码注册,且活动期间累计交易量不低于50,000 USDT的用户。
**【交易回血丹】最高可得$2,888!**
活动期间,KOL累计交易量达标,可获得对应奖励。
累计交易量要求
奖励
6,000万USDT
2,888 USDT
2,400万USDT
1,288 USDT
1,200万USDT
588 USDT
600万USDT
288 USDT
200万USDT
88 USDT
**活动说明:**
1.本活动仅统计扣除手续费交易量;
2.首月加佣时间为:11.11-12.10;
3.本活动与平台其他同类型活动奖励不同享。若您同时参加多个活动,将按照最高奖励进行发放;
4.若使用机器人、作弊或提交重复资料参与活动,将被取消参与资格。使用多个账户者亦会被取消奖励资格。
\*孙悟空对本次活动持有最终解释权。
[上一页邀请好友,赚取10%手续费返现和返佣!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/yao-qing-hao-you-zhuan-qu-10-shou-xu-fei-fan-xian-he-fan-yong)
[下一页孙悟空合约体验金早鸟计划:邀请好友,抢先体验四重早鸟特权](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/sun-wu-kong-he-yue-ti-yan-jin-zao-niao-ji-hua-yao-qing-hao-you-qiang-xian-ti-yan-si-chong-zao-niao-t)
最后更新于1个月前
---
# 135 万美金奖励来袭|孙悟空平台第一期交易挖矿重磅上线 | 孙悟空
尊敬的用户:
为回馈广大用户的支持,提升平台交易活跃度,孙悟空将正式上线 第一期交易挖矿活动。活动期间,用户参与指定永续合约交易对,即可在全部返还手续费的基础上,获得额外 SUN 代币奖励。
本次活动奖励为 $SUN 代币,将为广大用户提供前所未有的资产增长机会,同时活动期间参与活动交易对的报名用户产生的所有手续费收入,将用于 $SUN代币回购,以支持 $SUN代币价值的稳定增长。
###
[](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/135-wan-mei-jin-jiang-li-lai-xi-sun-wu-kong-ping-tai-di-yi-qi-jiao-yi-wa-kuang-zhong-bang-shang-xian#mi4h69bcz6ywhvv4sj)
[立即参与>>](https://www.sunwukong.io/zh-cn/futures/tradeMining/)
**一、活动时间**
● 活动时间:2025年11月21日 20:00:00 —— 2025年12月06日 20:00:00(UTC+8)
● 每日挖矿活动从T日20:00(UTC+8)开始,至T+1日20:00(UTC+8)结束。
● 每日奖池奖励将等额分为 24 个时段,整点更新。
● 挖矿奖励将于T+2日12:00(UTC+8)统计并更新,届时用户可领取$SUN挖矿奖励。
**二、活动规则**
● 参与门槛:报名即可参与活动
● 活动交易对:BTC/USDT、ETH/USDT、SUN/USDT
● 奖池设置:
○ 每日奖池:90,000 USDT等值SUN代币
○ 总奖池:1,350,000 USDT等值SUN代币
● 每日奖池金额为固定数值的 USDT,活动会按照每日挖矿周期开始时的 $SUN 代币价格计算奖池 $SUN代币数量。
○ 例如 T 日20:00点交易挖矿活动开始时,$SUN代币价格为 0.03 USDT,当日奖池为 90,000 USDT 的话,那么当日奖池的 $SUN代币 总奖励数量为 3,000,000 枚$SUN代币。
**三、奖励计算规则**
● 奖励公式:奖励数量 = 用户当日实际产生的手续费(USDT) × 对应奖励比例 ÷ T日 20:00(UTC+8)$SUN代币价格
● 奖励比例:
○ Maker:110%
○ Taker:107%
● 单用户每小时奖励上限:500 USDT等值$SUN代币
举例:若 T 日 20:00 活动开始时,$SUN 代币价格为 0.03 USDT,用户在 T 日 20:00 到T+1 日 20:00 期间,于 BTC/USDT 永续合约交易对实际产生手续费 100 USDT,且全部为Maker订单,同时产生的手续费的时间在当期挖矿奖池奖励消耗完成之前且用户未达到个人奖励上限。
那么用户当日奖池可以获得的 $SUN代币 奖励数量为:100 × 110% ÷ 0.03 = 3,667 枚SUN
奖励更新并开放领取时间为 T+2日12:00(UTC+8)
**四、$SUN代币回购销毁机制**
活动期间,参与活动交易对报名用户产生的所有手续费收入,将用于$SUN代币回购,以支持$SUN代币价值的稳定增长。$SUN代币回购将在HTX平台内进行,回购所得$SUN代币将全额销毁,销毁时间将在每季度末进行,具体时间另行通知。
为便于回购数据计算,每日手续费统计周期为00:00——23:59(UTC+8),T日20:00:00活动开始后,首日回购的手续费统计周期为T+1日的00:00——23:59(UTC+8), T+1日的手续费将于T+2日完成回购并进行公示,以此类推。
活动开始后,每日回购数据详情以公告为准。
[《交易挖矿活动$SUN代币回购详情公示》](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/jiao-yi-wa-kuang-huo-dong-sun-dai-bi-hui-gou-xiang-qing-gong-shi)
**五、注意事项**
● 奖励 $SUN 代币将发放至孙悟空平台,建议用户优先选择 Tron链网络参与活动;若选其他公链参与,孙悟空平台预计2025年Q4季度内开放$SUN一键兑换USDT功能,敬请期待。
● 此活动限制做市商用户参与。
● 活动期间每小时每位用户有奖励上限,达到个人挖矿奖励上限或奖池上限后奖励将不会增加。
● 参与交易挖矿活动的用户,可获得挖矿奖励部分的手续费,奖池挖满之前不会给上级进行返佣,其他手续费返佣不受影响。
● 交易挖矿奖励将剔除同期迎新盛典-每日交易排行赛奖励后进行发放。
● 孙悟空平台保留取消相关作弊用户资格并没收其奖励的权利。
● 本活动最终解释权归孙悟空所有。
感谢您的支持与信任,我们期待您的积极参与!
孙悟空团队 2025年11月21日
[上一页孙悟空KOL「交易冲刺计划」重磅启动,月月领$10,000奖励!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/sun-wu-kong-kol-jiao-yi-chong-ci-ji-hua-zhong-bang-qi-dong-yue-yue-ling-10000-jiang-li)
[下一页交易挖矿活动$SUN代币回购详情公示](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/jiao-yi-wa-kuang-huo-dong-sun-dai-bi-hui-gou-xiang-qing-gong-shi)
最后更新于1个月前
---
# 孙悟空合约体验金早鸟计划:邀请好友,抢先体验四重早鸟特权 | 孙悟空
孙悟空(Sunperp)合约体验金即将上线! 我们推出【合约体验金早鸟计划】,诚邀您成为「早鸟合约体验官」,和好友一起零本金试错合约、放大盈利机会、降低爆仓焦虑。
只要邀请好友参与,双方都可领取合约体验金、首单免手续费、额外返佣等多重权益,_让「第一次交易合约」不再只靠真金白银试错。_
活动时间:2025年11月17日18:00 - 2025年11月20日23:59(UTC+8)
[立即报名](https://forms.gle/BYS6ez8q5hfaSvsdA)
**合约体验金:** 可用于抵扣部分合约手续费 / 资金费率 / 仓位亏损等,详细使用规则以活动页说明为准,敬请期待。
**早鸟特权一:邀请1位好友,抢先解锁【早鸟体验官身份】**
成功邀请1名好友注册并完成一笔≥20 USDT合约交易,您与好友将分别获得:
● 您(邀请人):10 USDT合约体验金 + “早鸟体验官” 身份
● 您的好友:5 USDT合约体验金+首笔交易免手续费,帮他零成本开启第一笔合约交易
**早鸟特权二:邀请更多好友,冲击至尊体验官席位**
邀请好友越多,早鸟体验官等级越高,合约体验金奖励越丰厚,还可解锁平台新功能优先内测资格:
**早鸟体验官等级**
**邀请人数条件**
**奖励**
初级体验官
邀请 ≥ 3 人
15 USDT 合约体验金
高级体验官
邀请 ≥ 5 人
60 USDT 合约体验金+「至尊体验官」冲击资格
至尊体验官
邀请人数排名前50名
200 USDT 合约体验金 + 平台新功能优先内测资格
**早鸟特权三:再享10%额外返佣,提升被动收益**
活动期间,好友注册后 7 日内产生的合约手续费,在基础返佣之外,再享 10% 额外返佣。
**示例:**
● 好友产生合约手续费 100 USDT
● 你可获得收入 = 20 USDT(基础返佣20%) + 10 USDT(活动额外10%)
● **合计到手:30 USDT 返佣**
**早鸟特权四:好友七日成长礼,解锁体验金与手续费折扣**
您邀请的好友每日交易量≧200 USDT并且连续交易,即可解锁累计 25 USDT 体验金 与 9折手续费特权:
● 连续交易天数≧2天:5 USDT合约体验金
● 连续交易天数≧3天:8 USDT合约体验金
● 连续交易天数≧7天:12 USDT合约体验金 + 9折交易手续费(未来30天内有效)
**活动说明:**
● 本活动仅限报名用户参与,需要提供正确的邀请码。
● 活动总奖励共计50,000 USDT合约体验金,按照邀请好友的交易量降序发放。
● 受邀好友仅计算活动期间首次连接钱包的用户。若用户在绑定邀请码前已完成首充或交易则不计算在内。
● 活动奖励将于活动结束后 14个工作日内统一发放至 孙悟空 账户中。
● 禁止自成交/对敲、同资金源批量互邀、脚本化秒开秒平等,命中将无法获得奖励。
● 若发现恶意刷量、对倒等行为,将取消奖励资格。
● 本活动最终解释权归孙悟空所有。
感谢您的支持与信任,期待您的参与!
孙悟空 团队
2025年11月17日
[上一页双十一剁手了?别慌,孙悟空“回血计划”启动! 限时加佣10%,最高领取$2,888现金奖励!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/shuang-shi-yi-duo-shou-le-bie-huang-sun-wu-kong-hui-xue-ji-hua-qi-dong-xian-shi-jia-yong-10-zui-gao)
[下一页孙悟空重磅发布:$5,000,000$ 空投计划 #1:Arbitrum专场!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/sun-wu-kong-zhong-bang-fa-bu-5000000-kong-tou-ji-hua-1arbitrum-zhuan-chang)
最后更新于1个月前
---
# 孙悟空KOL「交易冲刺计划」重磅启动,月月领$10,000奖励! | 孙悟空
**活动时间:**2025年11月21日00:00--2026年1月31日23:59(按自然月独立结算,奖励月月发放!)
**参与对象:**孙悟空KOL
**参与方式**:联系您的商务经理,或直接[报名参与>>](https://forms.gle/4gxnf4kTiBr6Jt4c9)
感恩有您相伴,孙悟空特别为KOL推出「交易冲刺计划」!总奖池10万 USDT等您来拿!活动期间,邀请好友注册交易,且满足手续费要求,连续3个月,月月享奖励,每个自然月最高可领10,000 USDT!让您的付出获得超值回报!
自然月累计手续费要求
(USDT)
奖励金额
(USDT)
≥1,000
200
≥2,000
400
≥4,000
800
≥8,000
1,600
≥16,000
3,200
≥32,000
6,400
≥50,000
10,000
\*以上活动奖励不可叠加,按照达标的最高奖励发放。
**活动说明:**
1.需剔除参加交易挖矿活动所产生的手续费;
2.活动奖励将在每个自然月结束后14个工作日内为符合条件的用户发放;
3.本活动与平台其他同类型活动奖励不同享。若您同时参加多个活动,将按照最高奖励进行发放;
4.若使用机器人、作弊或提交重复资料参与活动,将被取消参与资格。使用多个账户者亦会被取消奖励资格。
\*孙悟空对本次活动持有最终解释权。
[上一页孙悟空重磅发布:$5,000,000$ 空投计划 #1:Arbitrum专场!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/sun-wu-kong-zhong-bang-fa-bu-5000000-kong-tou-ji-hua-1arbitrum-zhuan-chang)
[下一页135 万美金奖励来袭|孙悟空平台第一期交易挖矿重磅上线](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/135-wan-mei-jin-jiang-li-lai-xi-sun-wu-kong-ping-tai-di-yi-qi-jiao-yi-wa-kuang-zhong-bang-shang-xian)
最后更新于1个月前
---
# 孙悟空KOL专享双重感恩礼遇,限时加佣10%,最高领取$2,800答谢礼! | 孙悟空
活动时间:2025年11月25日00:00--2025年12月9日23:59
参与对象:孙悟空KOL
**参与方式:联系您的商务经理,或直接**[**报**名参与>>](https://forms.gle/B21dSBWMoRkg8CHs6)
孙悟空KOL专属「感恩盛宴」开启,双重感恩礼遇,温暖这个冬季!
**【感恩拉新礼】限时加佣10%+好友立得$10**
KOL专享:活动期间,邀请好友注册交易,限时加佣10%!
好友专享:KOL每邀请1个有效好友,该好友获得$10,每位KOL仅限前20名邀请的好友可领取!先到先得!
\*有效好友: 活动期间,通过您的孙悟空专属链接/邀请码注册,且活动期间累计交易量不低于50,000 USDT的用户。
**【感恩交易礼】与好友共享,最高可得$2,800!**
活动期间,所有孙悟空KOL及其邀请的好友总交易量达标,最高可得$2,800奖励!还可与邀请的好友平分奖励!总奖池$20,000,等您来拿!
累计交易量要求
总奖励
KOL奖励
邀请的好友
按比例瓜分奖励
6,000万USDT
$2,800
$1,400
$1,400
3,000万USDT
$1,400
$700
$700
1,500万USDT
$700
$350
$350
600万USDT
$300
$150
$150
300万USDT
$150
$75
$75
100万USDT
$50
$25
$25
\*活动期间,累计交易量不低于10,000USDT的用户可参与瓜分奖励。以上活动奖励不可叠加,按照达标的最高奖励发放。
**活动说明:**
1.本活动仅统计扣除手续费交易量,且需剔除参加交易挖矿活动产生的交易量;
2.本活动与平台其他同类型活动奖励不同享。若您同时参加多个活动,将按照最高奖励进行发放;
3.若使用机器人、作弊或提交重复资料参与活动,将被取消参与资格。使用多个账户者亦会被取消奖励资格。
\*孙悟空对本次活动持有最终解释权。
[上一页邀请好友,瓜分100万枚SUN](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/yao-qing-hao-you-gua-fen-100-wan-mei-sun)
[下一页135 万美金奖励来袭|孙悟空平台第二期交易挖矿重磅上线](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/135-wan-mei-jin-jiang-li-lai-xi-sun-wu-kong-ping-tai-di-er-qi-jiao-yi-wa-kuang-zhong-bang-shang-xian)
最后更新于1个月前
---
# 邀请好友,瓜分100万枚SUN | 孙悟空
尊敬的用户,
孙悟空品牌正式升级为 SunX!邀请志同道合的交易伙伴一起,共享100万枚 $SUN 成长红利,叠加迎新盛典与 20% 返佣,共赴专业交易新篇章。
**活动时间:**11月24日18:00 - 12月3日17:59 (UTC+8)
[立即报名活动](https://forms.gle/LgH7pnfQeCbJdhmt8)
**如何参与邀请?**
1\. 获取邀请链接:登录孙悟空,进入【[邀请好友](https://www.sunwukong.io/zh-cn/futures/invite/)
】获取专属链接/邀请码
2\. 分享给好友:将链接或邀请码发送给好友;好友通过邀请链接连接钱包,或在【绑定邀请人】处添加您的邀请码
3\. 坐享奖励:好友完成交易任务,你和好友即可获得奖励。
[详细教程点这里>>](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma)
**活动规则:**
每成功邀请一位好友,你最高可得130枚$SUN,好友最高可得130枚$SUN。共100万枚$SUN,等你与好友来瓜分!
● 首单达标礼
受邀好友首单交易额≥300 USDT,你得30枚$SUN,TA得20枚$SUN。
● 7日达标礼
受邀好友7 天内累计交易额≥20,000 USDT,你得100枚$SUN,TA得100枚$SUN。
\*本活动可与「迎新盛典」奖励、20%返佣同享。
**注意事项:**
● 活动奖池共计100万枚$SUN,若获奖人数超出总奖池额度,则根据好友交易量降序发放,发完为止。
● 受邀好友仅计算活动期间首次连接钱包的用户。若用户在绑定邀请码前已完成首充或交易则不计算在内。
● 活动结束后3天内,受邀好友净入金额≧10 USDT,邀请双方方可获得奖励。
● 活动奖励可叠加计算,将于活动结束后 14个工作日内统一发放至孙悟空账户中。
● 禁止自成交/对敲、同资金源批量互邀、脚本化秒开秒平等,命中将无法获得奖励。
● 若发现恶意刷量、对倒等行为,将取消奖励资格。
● 本活动最终解释权归孙悟空所有。
感谢您的支持与信任,期待您的参与!
孙悟空
2025年11月24日
[上一页交易挖矿活动$SUN代币回购详情公示](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/jiao-yi-wa-kuang-huo-dong-sun-dai-bi-hui-gou-xiang-qing-gong-shi)
[下一页孙悟空KOL专享双重感恩礼遇,限时加佣10%,最高领取$2,800答谢礼!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/sun-wu-kong-kol-zhuan-xiang-shuang-chong-gan-en-li-yu-xian-shi-jia-yong-10-zui-gao-ling-qu-2800-da-x)
最后更新于1个月前
---
# 交易挖矿活动$SUN代币回购详情公示 | 孙悟空
尊敬的用户:
孙悟空平台交易挖矿活动不定期进行中。每日回购$SUN代币详情将在本公告持续更新,$SUN代币回购将在HTX平台内进行,回购所得$SUN代币将全额销毁,销毁时间将在每季度末进行,具体时间另行通知。
交易活动详情,[立即前往>>](https://www.sunwukong.io/zh-cn/futures/tradeMining/)
回购说明:交易挖矿活动期间,每日活动交易对报名用户产生的所有手续费收入,将全额用于 $SUN代币 回购。
交易挖矿活动回购明细:_手续费收入为【BTC/USDT,ETH/USDT,SUN/USDT】三种代币交易对,下方仅展示折合为USDT后的数量。_
第2期活动详情,[前往了解>>](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/135-wan-mei-jin-jiang-li-lai-xi-sun-wu-kong-ping-tai-di-er-qi-jiao-yi-wa-kuang-zhong-bang-shang-xian)
时间(UTC+8)
手续费收入 (折合 USDT)
$SUN代币回购数量
2025年12月11日
6,279.65
309,916.53
2025年12月12日
9,848.43
486,044.80
2025年12月13日
7,777.10
383,052.58
2025年12月14日
15,500.34
763,452.35
2025年12月15日
20,789.07
1,024,967.95
2025年12月16日
15,345.98
756,606.12
2025年12月17日
26,371.23
1,299,337.46
2025年12月18日
22,583.14
1,112,694.39
2025年12月19日
26,149.43
1,941,972.65
2025年12月20日
26,106.23
2,837,671.79
2025年12月21日
29,701.34
1,463,205.67
2025年12月22日
32,053.74
1,579,094.21
2025年12月23日
39,453.65
1,941,972.65
2025年12月24日
57,650.92
2,837,671.79
2025年12月25日
53,148.69
2,700,126.12
2025年12月26日
28,721.07
1,501,429.31
第1期活动详情,[前往了解>>](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/135-wan-mei-jin-jiang-li-lai-xi-sun-wu-kong-ping-tai-di-yi-qi-jiao-yi-wa-kuang-zhong-bang-shang-xian)
时间(UTC+8)
手续费收入
(折合 USDT)
$SUN代币回购数量
2025年11月23日
80.61
3,844.84
2025年11月24日
36.87
1,758.65
2025年11月25日
3,227.04
153,914.82
2025年11月26日
5,276.58
251,397.25
2025年11月27日
6,342.17
299,916.83
2025年11月28日
8,724.71
409,253.71
2025年11月29日
10,094.45
497,288.04
2025年11月30日
10,612.05
522,789.23
2025年12月1日
11,037.08
537,562.87
2025年12月2日
13,478.32
656,969.11
2025年12月3日
10944.07
509090.44
2025年12月4日
13665.58
635688.19
2025年12月5日
15384.95
715668.93
2025年12月6日
16468.84
766088.75
2025年12月7日
20802.85
967695.93
备注:
● 为便于回购数据计算,每日手续费统计周期为00:00——23:59(UTC+8),例如2025年11月21日20:00:00活动开始后,首日回购的手续费统计周期为2025年11月22日00:00——11月22日23:59(UTC+8),11月22日的手续费将于11月23日完成HTX回购并进行公示。2025年12月06日20:00:00(UTC+8)为活动结束时间,那么最后一日回购的手续费统计周期为2025年12月06日00:00——12月06日23:59(UTC+8),12月06日的手续费将于12月07日完成回购并进行公示。
● 2025年11月21日00:00:00(UTC+8)后,参与交易挖矿活动的用户,可获得挖矿奖励部分的手续费,奖池未挖完前不会进行返佣和返现,其他手续费的返佣和返现不受影响。
感谢您的支持与信任,我们期待您的积极参与!
孙悟空团队
2025年11月21日
[上一页135 万美金奖励来袭|孙悟空平台第一期交易挖矿重磅上线](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/135-wan-mei-jin-jiang-li-lai-xi-sun-wu-kong-ping-tai-di-yi-qi-jiao-yi-wa-kuang-zhong-bang-shang-xian)
[下一页邀请好友,瓜分100万枚SUN](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/yao-qing-hao-you-gua-fen-100-wan-mei-sun)
最后更新于7天前
---
# 135 万美金奖励来袭|孙悟空平台第二期交易挖矿重磅上线 | 孙悟空
尊敬的用户:
为感谢广大用户对第一交易挖矿活动的热情响应,孙悟空将正式上线第二期交易挖矿活动。活动期间,用户参与指定永续合约交易对,即可在全部返还手续费的基础上,获得额外 SUN 代币奖励。
本次活动奖励为 $SUN 代币,活动期间参与活动交易对的报名用户产生的所有手续费收入,将用于 $SUN代币回购,持续推动 $SUN 价值稳步增长,为用户提供前所未有的资产增长机会、创造更高收益,真正实现越挖越赚!
[**立即参与>>**](https://www.sunwukong.io/zh-cn/futures/tradeMining/)
**一、活动时间**
● 活动时间:2025年12月10日 20:00:00 —— 2025年12月25日 20:00:00(UTC+8)
● 每日挖矿活动从T日20:00(UTC+8)开始,至T+1日20:00(UTC+8)结束。
● 每日奖池奖励将等额分为 24 个时段,整点更新。
● 挖矿奖励将按小时进行统计并更新,用户可在该时段结束后第 2 小时进行$SUN挖矿奖励的领取。
**二、活动规则**
● 参与门槛:报名即可参与活动
● 活动交易对:BTC/USDT、ETH/USDT、SUN/USDT
● 奖池设置:
交易对
每日奖池(等值$SUN代币)
总奖池(等值$SUN代币)
BTC/USDT
35,000 USDT
525,000 USDT
ETH/USDT
35,000 USDT
525,000 USDT
SUN/USDT
20,000 USDT
300,000 USDT
总计
90,000 USDT
1,350,000 USDT
● 每日每个币对的奖池金额为固定数值的USDT,活动会按照每日挖矿时段开始时的 $SUN 代币收盘价格计算奖池 $SUN代币数量。
○ 例如 T 日20:00点交易挖矿活动开始时,$SUN代币收盘价格为 0.02 USDT,假设T 日 20:00 - 21:00 时段BTC/USDT交易对奖池为 1,458 USDT 的话,那么BTC/USDT交易该时间段奖池的 $SUN代币 总奖励数量为 1,458 / 0.02 = 72,900 枚$SUN代币。
**三、奖励计算规则**
● 奖励公式:单笔订单获得的挖矿奖励 = 用户该笔订单实际产生的手续费(USDT) × 对应奖励比例 ÷ 挖矿时段开始时的 $SUN代币收盘价格
● 奖励比例:
○ Maker:110%
○ Taker:107%
● 单用户每小时奖励上限:
交易对
单用户每小时奖池上限(等值$SUN代币)
BTC/USDT
200 USDT
ETH/USDT
200 USDT
SUN/USDT
100 USDT
总计
500 USDT
举例:若 T 日 20:00 活动开始时,$SUN 代币价格为 0.02 USDT,用户在 T 日 20:00 到T 日 21:00 期间,于 BTC/USDT 永续合约交易对进行一单交易,实际产生手续费 100 USDT,且为Maker订单,同时产生的手续费的时间在当期挖矿奖池奖励消耗完成之前且用户未达到个人奖励上限。
那么用户该笔订单可以获得的 $SUN代币 奖励数量为:100 × 110% ÷ 0.02 = 5,500 枚SUN
奖励更新并开放领取时间为 T 日22:00(UTC+8)
**四、$SUN代币回购销毁机制**
活动期间,参与活动交易对报名用户产生的所有手续费收入,将用于$SUN代币回购,以支持$SUN代币价值的稳定增长。$SUN代币回购将在HTX平台内进行,回购所得$SUN代币将全额销毁,销毁时间将在每季度末进行,具体时间另行通知。
为便于回购数据计算,每日手续费统计周期为00:00——23:59(UTC+8),T日20:00:00活动开始后,首日回购的手续费统计周期为T+1日的00:00——23:59(UTC+8), T+1日的手续费将于T+2日完成回购并进行公示,以此类推。
活动开始后,每日回购数据详情以公告为准。
[《交易挖矿活动$SUN代币回购详情公示》](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/jiao-yi-wa-kuang-huo-dong-sun-dai-bi-hui-gou-xiang-qing-gong-shi)
**五、注意事项**
● 奖励 $SUN 代币将发放至孙悟空平台,建议用户优先选择 Tron链网络参与活动;若选其他公链参与,孙悟空平台预计2025年Q4季度内开放$SUN一键兑换USDT功能,敬请期待。
● 此活动限制做市商用户参与。
● 活动期间每小时每位用户有奖励上限,达到个人挖矿奖励上限或奖池上限后奖励将不会增加。
● 参与交易挖矿活动的用户,可获得挖矿奖励部分的手续费,奖池挖满之前不会给上级进行返佣,其他手续费返佣不受影响。
● 平台同期交易类活动奖励将剔除交易挖矿奖励后进行发放。
● 孙悟空平台保留取消相关作弊用户资格并没收其奖励的权利。
● 本活动最终解释权归孙悟空所有。
感谢您的支持与信任,我们期待您的积极参与!
孙悟空团队 2025年12月10日
[上一页孙悟空KOL专享双重感恩礼遇,限时加佣10%,最高领取$2,800答谢礼!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/sun-wu-kong-kol-zhuan-xiang-shuang-chong-gan-en-li-yu-xian-shi-jia-yong-10-zui-gao-ling-qu-2800-da-x)
[下一页【限时14天】孙悟空体验金上线,全民撸百万美金空投!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/xian-shi-14-tian-sun-wu-kong-ti-yan-jin-shang-xian-quan-min-lu-bai-wan-mei-jin-kong-tou)
最后更新于28天前
---
# 孙悟空-Affiliate返佣规则 | 孙悟空
1\. 孙悟空 平台返佣比例及考核标准 孙悟空 返佣规则中按照邀请人可获得佣金比例共分为3个等级,邀请者的等级越高,可享受的总返佣比例越高,邀请者满足下列“邀请人要求”中任意一条,即可与商务经理联络申请开通佣金比例,具体规则如下:
佣金等级
佣金比例
邀请者要求(条件为“或”)
被邀请者要求
Level1
30%
1\. 个人交易量:30 天加权交易额≥50w; 2. 团队规模:累计邀请≥10 人(自然月内活跃交易者≥5 人); 3. 交易额规模:自然月交易额达到 100w
无特定要求
Level2
40%
1\. 个人交易量:30 天加权交易额≥250w; 2. 团队规模:累计邀请≥20 人(自然月内活跃交易者≥5 人,且最少 1 人达到 VIP2); 3. 交易额规模:自然月交易额达到 500w
被邀请者需为 VIP2(30 天加权交易额≥100w)
Level3
50%
1\. 个人交易量:30 天加权交易额≥500w; 2. 团队规模:累计邀请≥50 人(自然月内活跃交易者≥10 人,且最少 3 人达到 VIP2 或 1 人达到 VIP3); 3. 交易额规模:自然月交易额达到 1000w
1\. 被邀请者为 VIP2(30 天加权交易额≥100w);2. 被邀请者为 VIP3(30 天加权交易额≥500w)
2\. KOL返佣升降级: 周期:孙悟空 将以每个自然月为周期,对已合作邀请者进行考核,考核标准参照各梯度佣金比例要求 升级:每月评估将在每个自然月第一天 (UTC+8) 00:00:00 开始,统计当月累计数据,更新通常会在次月第一个工作周内完成。如果您符合更高等级的标准,将升级并享受对应返佣比例,最高佣金比例为50%封顶。 例如:10月份是您为Level2级邀请者,享受40%佣金比例,在10月考核中累积达成Level3中任意一条标准,即可为您开通Level3返佣,在11月的第一个工作周为您升级,您将享受50%佣金。 降级:每月评估将在每个自然月第一天 (UTC+8) 00:00:00 开始,统计当月累计数据,更新通常会在次月第一个工作周内完成。如果当月您未满足当前等级要求,系统将执行降级,降低至您所达标的最高等级。当您的等级被降级后,受邀人优惠比例保持不变,但您的返佣比例会根据最新的总返佣比例调整。 例如:10月份是您为Level2级邀请者,享受40%佣金比例,在10月考核中累积未达成Level2中任意一条标准,在11月的第一个工作周后为您降级至Level1,您将享受30%佣金。
3\. 大客户返佣折算率 奖励额(USDT)=实际产生交易量\*实收手续费率\*佣金比例\*邀请者保留率
孙悟空 VIP Tier
30 天加权交易量($)
邀请者保留率(Amount Kept)
1
≤100 万
100%
2
\>100 万
100%
3
\>500 万
90%
4
\>2500 万
80%
5
\>1 亿
70%
6
\>5 亿
60%
4\. KOL与Broker邀请人重叠的解决方案 如发生已经有上级邀请关系的用户,使用非邀请关系的经纪商ID进行下单时,将会将该用户所产生的佣金的30%结算给经纪商,佣金中的70%仍然发放给该用户的上级邀请人 。
5\. 注意事项
l 佣金结算与发放将在Today+1的20:00-21:00(UTC)进行。
l 孙悟空 的所有邀请关系默认永久有效。
l 您可以邀请的人数没有限制。
l 只有使用您的推荐链接注册的新用户才有资格。
l 禁止自我推荐(创建多个账户邀请自己)。一经发现,所有推荐奖励将被撤销,佣金也将被取消。
l 孙悟空 返现规则待更新。
l 孙悟空 保留随时更新计划规则或取消推荐计划的权利。
l 孙悟空 还保留对该计划条款的最终解释权。
[上一页如何获取/绑定邀请码?](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma)
[下一页简介](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/jian-jie)
最后更新于1个月前
---
# 【限时14天】孙悟空体验金上线,全民撸百万美金空投! | 孙悟空
尊敬的用户:
我们隆重推出全新「体验金」功能,并为您准备了一场持续14天的空投盛宴——无论新老用户,均可瓜分百万美金体验金。
**空投时间:**2025年12月13日 00:00- 2025年12月26日23:59(UTC+8)
**如何领取空投?**
满足以下任意1个空投条件,可领5 USDT合约体验金。
空投1(历史交易用户):2025年9月19日-2025年12月12日23:59(UTC+8)期间,累计合约交易≥1,000 USDT
空投2(活跃交易用户):活动期间,累计合约交易≥5,000 USDT
空投3(新用户专属):活动期间,完成首次合约交易≥1,000 USDT
**如何参与?**
您只需[**填写表单**](https://forms.gle/uZXCDtzSnX9TFJUX7)
信息,平台将自动向符合条件的用户发放空投。
**活动说明:**
1\. 每日奖池:8万USDT合约体验金,按条件完成顺序,先到先得;
2\. 本活动奖励与平台其他活动奖励不共享;
3\. 活动奖励的USDT将以体验金形式,活动奖励将于每周一、三、五对完成活动未领奖用户进行发放;
4\. 合约体验金:可用于抵扣部分合约手续费/资金费率/仓位亏损等,详细使用规则以活动页说明为准;
5\. 体验金领取和使用有效期均为3天,请及时领取并使用;
6\. 本活动做市商不可参与;若使用机器人、刷量作弊或提交重复资料参与活动,将会被取消参与资格。使用多个账户者亦会被取消奖励资格;
7\. 本活动仅统计正手续费交易额,0手续费/负maker/体验金等交易额不计入统计。
8\. 本活动最终解释权归孙悟空所有。
孙悟空团队
2025年12月12日
[上一页135 万美金奖励来袭|孙悟空平台第二期交易挖矿重磅上线](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/135-wan-mei-jin-jiang-li-lai-xi-sun-wu-kong-ping-tai-di-er-qi-jiao-yi-wa-kuang-zhong-bang-shang-xian)
[下一页31.5万美金福利来袭|孙悟空平台第三期交易挖矿上线](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/31.5-wan-mei-jin-fu-li-lai-xi-sun-wu-kong-ping-tai-di-san-qi-jiao-yi-wa-kuang-shang-xian)
最后更新于26天前
---
# 31.5万美金福利来袭|孙悟空平台第三期交易挖矿上线 | 孙悟空
尊敬的用户:
孙悟空平台交易挖矿迎来第三期活动。继前两期活动顺利收官、交易热度持续释放,平台推出第三期交易挖矿。活动期间,用户参与指定永续合约交易对,即可在手续费全额返还的基础上,额外获得 SUN 代币奖励。
本次活动奖励为 $SUN 代币,活动期间参与活动交易对的报名用户产生的所有手续费收入,将用于 $SUN代币回购,持续推动 $SUN 价值稳步增长,为用户提供前所未有的资产增长机会、创造更高收益,真正实现越挖越赚!
[**立即参与>>**](https://www.sunwukong.io/zh-cn/futures/tradeMining/)
**一、活动时间**
● 活动时间:2026年1月6日 20:00:00 —— 2026年1月13日 20:00:00(UTC+8)
● 每日挖矿活动从T日20:00(UTC+8)开始,至T+1日20:00(UTC+8)结束。
● 每日奖池奖励将等额分为 24 个时段,整点更新。
● 挖矿奖励将按小时进行统计并更新,用户可在该时段结束后第 2 小时进行$SUN挖矿奖励的领取。
**二、活动规则**
● 参与门槛:报名即可参与活动
● 活动交易对:BTC/USDT、ETH/USDT、SUN/USDT
● 奖池设置:
交易对
每日奖池(等值$SUN代币)
总奖池(等值$SUN代币)
BTC/USDT
30,000 USDT
210,000 USDT
ETH/USDT
10,000 USDT
70,000 USDT
SUN/USDT
5,000 USDT
35,000 USDT
总计
45,000 USDT
315,000 USDT
● 每日每个币对的奖池金额为固定数值的USDT,活动会按照每日挖矿时段开始时的 $SUN 代币收盘价格计算奖池 $SUN代币数量。
○ 例如 T 日20:00点交易挖矿活动开始时,$SUN代币收盘价格为 0.02 USDT,假设T 日 20:00 - 21:00 时段BTC/USDT交易对奖池为 1,250 USDT 的话,那么BTC/USDT交易该时间段奖池的 $SUN代币 总奖励数量为 1,250 / 0.02 = 62,500 枚$SUN代币。
**三、奖励计算规则**
● 奖励公式:单笔订单获得的挖矿奖励 = 用户该笔订单实际产生的手续费(USDT) × 对应奖励比例 ÷ 挖矿时段开始时的 $SUN代币收盘价格
● 奖励比例:
○ Maker:110%
○ Taker:107%
● 单用户每小时奖励上限:
交易对
单用户每小时奖池上限(等值$SUN代币)
BTC/USDT
200 USDT
ETH/USDT
100 USDT
SUN/USDT
100 USDT
总计
400 USDT
举例:若 T 日 20:00 活动开始时,$SUN 代币价格为 0.02 USDT,用户在 T 日 20:00 到T 日 21:00 期间,于 BTC/USDT 永续合约交易对进行一单交易,实际产生手续费 100 USDT,且为Maker订单,同时产生的手续费的时间在当期挖矿奖池奖励消耗完成之前且用户未达到个人奖励上限。
那么用户该笔订单可以获得的 $SUN代币 奖励数量为:100 × 110% ÷ 0.02 = 5,500 枚SUN
奖励更新并开放领取时间为 T 日22:00(UTC+8)
**四、$SUN代币回购销毁机制**
活动期间,参与活动交易对报名用户产生的所有手续费收入,将用于$SUN代币回购,以支持$SUN代币价值的稳定增长。$SUN代币回购将在HTX平台内进行,回购所得$SUN代币将全额销毁,销毁时间将在每季度末进行,具体时间另行通知。
为便于回购数据计算,每日手续费统计周期为00:00——23:59(UTC+8),T日20:00:00活动开始后,首日回购的手续费统计周期为T+1日的00:00——23:59(UTC+8), T+1日的手续费将于T+2日完成回购并进行公示,以此类推。
活动开始后,每日回购数据详情以公告为准。
[《交易挖矿活动$SUN代币回购详情公示》](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/jiao-yi-wa-kuang-huo-dong-sun-dai-bi-hui-gou-xiang-qing-gong-shi)
**五、注意事项**
● 奖励 $SUN 代币将发放至孙悟空平台。
● 此活动限制做市商用户参与。
● 活动期间每小时每位用户有奖励上限,达到个人挖矿奖励上限或奖池上限后奖励将不会增加。
● 参与交易挖矿活动的用户,可获得挖矿奖励部分的手续费。获得挖矿奖励得订单不会给上级进行返佣,其他手续费返佣不受影响。
● 平台同期交易类活动奖励将剔除交易挖矿奖励后进行发放。
● 孙悟空平台保留取消相关作弊用户资格并没收其奖励的权利。
● 本活动最终解释权归孙悟空所有。
感谢您的支持与信任,我们期待您的积极参与!
孙悟空团队 2026年1月6日
[上一页【限时14天】孙悟空体验金上线,全民撸百万美金空投!](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/xian-shi-14-tian-sun-wu-kong-ti-yan-jin-shang-xian-quan-min-lu-bai-wan-mei-jin-kong-tou)
[下一页邀请规则](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/yao-qing-gui-ze)
最后更新于1天前
---
# 如何获取/绑定邀请码? | 孙悟空
###
[](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma#ru-he-huo-de-yao-qing-ma)
如何获得邀请码?
**1\.** **打开** [**孙悟空-邀请好友**](https://www.sunwukong.io/zh-cn/futures/invite/)
**- 点击 【连接钱包】按钮连接钱包;**
\*当前支持连接Tronlink、Bitget Wallet、OKX Wallet、 TokenPocket、Binance Wallet

**2\. 连接钱包后,即可生成默认邀请码。**
支持用户将默认邀请码升级为**5-12位纯字母或者字母+数字的组合的【自定义邀请码】**,便于传播、强化个人品牌。创建后不可修改或删除,请谨慎设置。

###
[](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma#ru-he-fen-xiang-yao-qing-ma)
如何分享邀请码 ?
将邀请链接或邀请码通过以下方式分享给好友,好友接受邀请,双方即可共享20%返佣。
邀请人可从受邀好友的交易手续费中获得15%返佣,受邀好友可享受5%交易手续费返现。
1\. 连接钱包后,前往「邀请好友」页面,直接复制并分享邀请码。
2\. 引导受邀好友手动绑定邀请码:引导您的朋友在【邀请好友-绑定邀请人】入口下手动输入邀请码完成绑定。

###
[](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma#ru-he-cha-kan-yao-qing-guan-xi-he-fan-yong-shou-yi)
如何查看邀请关系和返佣收益 ?
当受邀好友绑定了您的邀请码并在 孙悟空 完成交易后,您将于次日20:00(UTC+8)前获得返佣收益。所有返佣数据都可以在[邀请好友](https://www.sunwukong.io/zh-cn/futures/invite/)
页面查看。
\*请注意,在每日维护时段,所显示的数据将基于前一天的资产状况,因此可能会出现轻微的差异或短暂的延迟。

###
[](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma#shou-yao-hao-you-ru-he-jie-shou-yao-qing)
受邀好友如何接受邀请 ?
受邀好友可通过以下两种方式接受邀请,并在与邀请人建立邀请关系后享受5%的交易手续费返现。
**1\. 通过邀请链接绑定钱包**
打开邀请链接后,点击【连接钱包】,选择想要连接的钱包,完成连接即可享受5%的交易手续费返现。

**2\. 邀请好友页面绑定邀请码**
若未通邀请链接绑定钱包,也可在【邀请好友-绑定邀请人】入口处添加邀请码,与邀请人绑定邀请关系。

**请注意:**
● 孙悟空 邀请返佣计划的相关细则可能会根据情况进行调整,孙悟空 保留因市场变化而更新规则的权利。
● 任何形式的滥用(如自我邀请、线下返现等)或不当使用均被严禁,孙悟空 拥有对使用条件进行限制或修订的权利。
[上一页邀请规则](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/yao-qing-gui-ze)
[下一页孙悟空-Affiliate返佣规则](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/sun-wu-kong-affiliate-fan-yong-gui-ze)
最后更新于1个月前
* [如何获得邀请码?](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma#ru-he-huo-de-yao-qing-ma)
* [如何分享邀请码 ?](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma#ru-he-fen-xiang-yao-qing-ma)
* [如何查看邀请关系和返佣收益 ?](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma#ru-he-cha-kan-yao-qing-guan-xi-he-fan-yong-shou-yi)
* [受邀好友如何接受邀请 ?](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma#shou-yao-hao-you-ru-he-jie-shou-yao-qing)
---
# 邀请规则 | 孙悟空
**邀请规则**
1.推荐页生成邀请码,分享给好友即可。
2.被邀请人仅能自定义一次邀请码。
3\. 被邀请人完成注册后,邀请人页面绑定信息将实时更新。
4.自定义邀请码和初始邀请码均可使用,无次数限制。
5.注册后,邀请人可以享受平台15%的推荐奖励;被邀请人可以享受平台5%的手续费折扣奖励
6.邀请关系一旦设定,不可更改,邀请人数无上限。
7.邀请奖励比例可能会根据市场情况或平台政策进行调整。所有更新将通过平台公告或直接通知相关用户。
**奖励结算**
· 奖励将以USDT的形式发放到您的交易账户。
· 好友接受邀请注册后,每产生一笔真实交易手续费(扣除对手方负费率后的实收手续费),会产生相应比例的奖励。
· 奖励额(USDT)=实际产生交易量\*实收手续费率\*奖励比例。
· 您可在推荐页面查看完整的邀请奖励历史记录
· 邀请奖励数据更新时间为UTC+8时区,每日20点后进入数据维护期。 维护期当日数据按前一天资产计算,可能存在细微差别和延迟。
**条款细则**
· 如被邀请人违反邀请奖励的相应风控规则,其手续费将不能发放给邀请人,同时,受邀人的邀请状态设为【已无效】并且产生的奖励记录状态设为【奖励无效】。
· 仅通过您推荐链接注册的新用户符合资格
· 禁止自我推荐(创建多账户邀请自身),一经发现将取消所有佣金收益
· 具有攻击性、误导性或有害的自定义推荐码可能导致被移出计划并取消佣金
· 推荐人应独立了解在其地区推广合约交易的风险与法律影响
· 平台有权酌情延长推荐有效期
· 平台保留随时修改返利率、计划规则或取消推荐计划的权利
· 平台保留对本计划条款的最终解释权
[上一页31.5万美金福利来袭|孙悟空平台第三期交易挖矿上线](https://sunx.gitbook.io/sunx-cn/ping-tai-huo-dong/31.5-wan-mei-jin-fu-li-lai-xi-sun-wu-kong-ping-tai-di-san-qi-jiao-yi-wa-kuang-shang-xian)
[下一页如何获取/绑定邀请码?](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/ru-he-huo-qu-bang-ding-yao-qing-ma)
最后更新于2个月前
---
# 简介 | 孙悟空
U本位合约联合保证金API简介:
* 联合保证金是一种合约交易方式,它允许用户在交易中使用多种资产作为保证金,而不是仅限于单一的保证金资产,能够提高资金的使用效率并降低风险。
U本位合约联合保证金的优势:
* 提高资金利用率 U本位合约联合保证金可以允许用户将账户中的多种资产(如USDT、BTC、ETH等)作为保证金,进行合约交易。这意味着用户不仅限于单一资产(例如USDT)进行保证金交易,可以更灵活地利用账户中的其他资产,从而提高资金的使用效率。
* 减少风险 联合保证金机制可以有效分散单一资产波动带来的风险。比如,在一个多资产组合的环境下,若某一资产出现较大的波动,其他资产的价格变动可能帮助平衡整个账户的风险,避免强制平仓。
* 降低资金锁仓成本 由于用户能够使用多种资产进行保证金交易,U本位合约联合保证金有助于降低单一资产的资金锁仓风险。用户可以根据市场变化动态调整自己的资产配置,而不必频繁进行充值或提现操作。
* 提高灵活性 用户可以选择多种方式来管理他们的保证金。例如,如果某种资产的价格上涨,用户可以选择将更多的资金用于保证金交易,而不必将资金全部转化为USDT。这样,用户在面对不同的市场条件时,能够更加灵活地调整自己的投资策略。
* 跨资产担保 在一些市场波动较大的情况下,某些资产可能会面临流动性问题或价格剧烈波动,联合保证金可以使用不同的资产来担保交易,增加了保证金来源的多样性,降低了单一资产可能导致的清算风险。
[上一页孙悟空-Affiliate返佣规则](https://sunx.gitbook.io/sunx-cn/ji-fen-yu-jiang-li/sun-wu-kong-affiliate-fan-yong-gui-ze)
[下一页快速开始](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi)
最后更新于2个月前
---
# 快速开始 | 孙悟空
[接入准备](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/jie-ru-zhun-bei)
[接口类型](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/jie-kou-lei-xing)
[签名认证](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/qian-ming-ren-zheng)
[websocket心跳](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/websocket-xin-tiao)
[上一页简介](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/jian-jie)
[下一页接入准备](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/jie-ru-zhun-bei)
---
# 接口类型 | 孙悟空
孙悟空为用户提供两种接口,您可根据自己的使用场景和偏好来选择适合的方式进行查询行情、交易或提币。
####
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/jie-kou-lei-xing#rest-api)
REST API
REST,即Representational State Transfer的缩写,是目前较为流行的基于HTTP的一种通信机制,每一个URL代表一种资源。
交易或资产提币等一次性操作,建议开发者使用REST API进行操作。
####
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/jie-kou-lei-xing#websocket-api)
WebSocket API
WebSocket是HTML5一种新的协议(Protocol)。它实现了客户端与服务器全双工通信,通过一次简单的握手就可以建立客户端和服务器连接,服务器可以根据业务规则主动推送信息给客户端。
市场行情和买卖深度等信息,建议开发者使用WebSocket API进行获取。
**接口鉴权**
以上两种接口均包含公共接口和私有接口两种类型。
公共接口可用于获取基础信息和行情数据。公共接口无需认证即可调用。
私有接口可用于交易管理和账户管理。每个私有请求必须使用您的API Key进行签名验证。
[上一页接入准备](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/jie-ru-zhun-bei)
[下一页签名认证](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/qian-ming-ren-zheng)
最后更新于2个月前
---
# 接入准备 | 孙悟空
如需使用API ,请先登录网页端,完成API key的申请和权限配置,再据此文档详情进行开发和交易。
您可以点击 [这里](https://www.sunperp.com/zh-cn/futures/api-manage/)
创建 API Key。
每个母用户可创建20组Api Key,每个Api Key可对应设置读取、交易、提币三种权限。
权限说明如下:
* 读取权限:读取权限用于对数据的查询接口,例如:订单查询、成交查询等。
* 交易权限:交易权限用于下单、撤单、划转类接口。
* 提币权限:提币权限用于创建提币订单、取消提币订单操作。
创建成功后请务必记住以下信息:
* `Access Key` API 访问密钥
* `Secret Key` 签名认证加密所使用的密钥(仅申请时可见)
每个 API Key 最多可绑定 20个IP 地址(主机地址或网络地址),未绑定 IP 地址的 API Key 有效期为90天。出于安全考虑,强烈建议您绑定 IP 地址。
**风险提示** :这两个密钥与账号安全紧密相关,无论何时都请勿将二者 **同时**向其它人透露。API Key的泄露可能会造成您的资产损失,若发现API Key泄露请尽快删除该API Key。
[上一页快速开始](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi)
[下一页接口类型](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/jie-kou-lei-xing)
最后更新于2个月前
---
# websocket心跳 | 孙悟空
[市场行情心跳](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/websocket-xin-tiao/shi-chang-hang-qing-xin-tiao)
[订单推送心跳](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/websocket-xin-tiao/ding-dan-tui-song-xin-tiao)
[上一页签名认证](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/qian-ming-ren-zheng)
[下一页市场行情心跳](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/websocket-xin-tiao/shi-chang-hang-qing-xin-tiao)
最后更新于2个月前
---
# 市场行情心跳 | 孙悟空
* WebSocket Server 发送心跳:
`{"ping": 18212558000}`
* WebSocket Client 应该返回:
`{"pong": 18212558000}`
注:WebSocket Client 和 WebSocket Server 建立连接之后,WebSocket Server 每隔 `5s`(这个频率可能会变化) 会向 WebSocket Client 发起一次心跳,WebSocket Client 忽略心跳 5 次后,WebSocket Server 将会主动断开连接;WebSocket Client发送最近 2 次心跳message中的其中一个`ping`的值,WebSocket Server都会保持WebSocket连接。
[上一页websocket心跳](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/websocket-xin-tiao)
[下一页订单推送心跳](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/websocket-xin-tiao/ding-dan-tui-song-xin-tiao)
最后更新于2个月前
---
# Rest | 孙悟空
[基础信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi)
[账户类](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei)
[订单类](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei)
[持仓类](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei)
[行情数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju)
[钱包](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao)
[上一页订单推送心跳](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/websocket-xin-tiao/ding-dan-tui-song-xin-tiao)
[下一页基础信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi)
---
# 订单推送心跳 | 孙悟空
* WebSocket API 支持单向心跳,Server 发起 ping message,Client 返回 pong message。 WebSocket Server 发送心跳:
复制
{
"op": "ping",
"ts": "1492420473058"
}
* WebSocket Client 应该返回:
复制
{
"op": "pong"
"ts": "1492420473058"
}
####
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/websocket-xin-tiao/ding-dan-tui-song-xin-tiao#id-9852b06629-45)
备注:
* "pong"操作返回数据里面的"ts"的值为"ping"推送收到的"ts"值
* WebSocket Client 和 WebSocket Server 建⽴立连接之后,WebSocket Server 每隔 5s(这个频率可能会变化) 会向 WebSocket Client 发起⼀一次⼼心跳,WebSocket Client 忽略心跳 5 次后,WebSocket Server 将会主动断开连接。
* 异常情况WebSocket Server 会返回错误信息,比如:
复制
{
"op": "error"
"ts": "1492420473027",
"err-code": 2011
"err-msg": “详细出错信息”
}
[上一页市场行情心跳](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/websocket-xin-tiao/shi-chang-hang-qing-xin-tiao)
[下一页Rest](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest)
最后更新于2个月前
---
# 签名认证 | 孙悟空
####
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/qian-ming-ren-zheng#qian-ming-shuo-ming)
签名说明
API 请求在通过 internet 传输的过程中极有可能被篡改,为了确保请求未被更改,除公共接口(基础信息,行情数据)外的私有接口均必须使用您的 API Key 做签名认证,以校验参数或参数值在传输途中是否发生了更改。 每一个API Key需要有适当的权限才能访问相应的接口,每个新创建的API Key都需要分配权限。在使用接口前,请查看每个接口的权限类型,并确认你的API Key有相应的权限。
一个合法的请求由以下几部分组成:
* 方法请求地址:即访问服务器地址 api.sunx.io,比如 api.sunx.io/sapi/v1/trade/order。
* API 访问Id(AccessKeyId):您申请的 API Key 中的 Access Key。
* 签名方法(SignatureMethod):第一种、用户使用椭圆曲线数字签名算法,使用Ed25519。第二种、用户计算签名的基于哈希的协议,使用 HmacSHA256。
* Ed25519介绍:是一种高性能的数字签名算法,提供快速的签名验证和生成,同时具备高安全性。
* 签名版本(SignatureVersion):签名协议的版本,此处使用2。
* 时间戳(Timestamp):您发出请求的时间 (UTC 时间) 。如:2017-05-11T16:22:06。在查询请求中包含此值有助于防止第三方截取您的请求。
* 必选和可选参数:每个方法都有一组用于定义 API 调用的必需参数和可选参数。可以在每个方法的说明中查看这些参数及其含义。
* 对于 GET 请求,每个方法自带的参数都需要进行签名运算。
* 对于 POST 请求,每个方法自带的参数不进行签名认证,并且需要放在 body 中。
* 签名:签名计算得出的值,用于确保签名有效和未被篡改。
####
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/qian-ming-ren-zheng#ed25519-qian-ming-bu-zhou)
Ed25519 签名步骤
规范要计算签名的请求 因为使用 Ed25519 进行签名计算时,使用不同内容计算得到的结果会完全不同。所以在进行签名计算前,请先对请求进行规范化处理。下面以查询某订单详情请求为例进行说明:
查询某订单详情时完整的请求URL
[https://api.api.sunx.io/sapi/v1/trade/order?](https://api.api.sunx.io/sapi/v1/trade/order%EF%BC%9F)
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`&SignatureMethod=Ed25519`
`&SignatureVersion=2`
`&Timestamp=2017-05-11T15:19:30`
`&order_id=1234567890`
**1\. 请求方法(GET 或 POST,WebSocket用GET),后面添加换行符 “\\n”**
例如:`GET\n`
**2\. 添加小写的访问域名,后面添加换行符 “\\n”**
例如:`api.sunx.io\n`
**3\. 访问方法的路径,后面添加换行符 “\\n”**
例如查询订单: `/sapi/v1/trade/order\n`
例如WebSocket v1 `/ws/v1`
**4\. 对参数进行URL编码,并且按照ASCII码顺序进行排序**
例如,下面是请求参数的原始顺序,且进行URL编码后
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`order_id=1234567890`
`SignatureMethod=Ed25519`
`SignatureVersion=2`
`Timestamp=2017-05-11T15%3A19%3A30`
使用 UTF-8 编码,且进行了 URL 编码,十六进制字符必须大写,如 “:” 会被编码为 “%3A” ,空格被编码为 “%20”。时间戳(Timestamp)需要以YYYY-MM-DDThh:mm:ss格式添加并且进行 URL 编码。时间戳有效时间5分钟。
经过排序之后
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`SignatureMethod=Ed25519`
`SignatureVersion=2`
`Timestamp=2017-05-11T15%3A19%3A30`
`order_id=1234567890`
**5\. 按照以上顺序,将各参数使用字符 “&” 连接**
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=Ed25519&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&order_id=1234567890`
**6\. 组成最终的要进行签名计算的字符串如下**
`GET\n`
`api.sunx.io\n`
`/sapi/v1/trade/order\n`
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=Ed25519&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&order_id=1234567890`
**7\. 用上一步里生成的 “请求字符串” 和你的密钥 (Secret Key) 生成一个数字签名**
1. 将上一步得到的请求字符串通过生成Ed25519的私钥,来加签生成签名
2. 将生成的签名用base-64编码,得到的值作为此次接口调用的数字签名。
`4F65x5A2bLyMWVQj3Aqp+B4w+ivaA7n5Oi2SuYtCJ9o=`
**8\. 将生成的数字签名加入到请求里**
对于Rest接口:
1. 把所有必须的认证参数添加到接口调用的路径参数里
2. 把数字签名在URL编码后加入到路径参数里,参数名为“Signature”。
最终,发送到服务器的 API 请求应该为
`https://api.sunx.io/sapi/v1/trade/order?AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&order_id=1234567890&SignatureMethod=Ed25519&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&Signature=4F65x5A2bLyMWVQj3Aqp%2BB4w%2BivaA7n5Oi2SuYtCJ9o%3D`
对于WebSocket接口:
1. 按照要求的JSON格式,填入参数和签名。
2. JSON请求中的参数不需要URL编码
例如:
`{ "action": "req", "ch": "auth", "params": { "authType":"api", "accessKey": "e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx", "signatureMethod": "Ed25519", "signatureVersion": "2.1", "timestamp": "2019-09-01T18:16:16", "signature": "4F65x5A2bLyMWVQj3Aqp+B4w+ivaA7n5Oi2SuYtCJ9o=" }}`
####
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/qian-ming-ren-zheng#hmacsha256-qian-ming-bu-zhou)
HmacSHA256 签名步骤
规范要计算签名的请求 因为使用 HMAC 进行签名计算时,使用不同内容计算得到的结果会完全不同。所以在进行签名计算前,请先对请求进行规范化处理。下面以查询某订单详情请求为例进行说明:
查询某订单详情时完整的请求URL
[https://api.sunx.io/sapi/v1/trade/order?](https://api.sunx.io/sapi/v1/trade/order?)
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`&SignatureMethod=HmacSHA256`
`&SignatureVersion=2`
`&Timestamp=2017-05-11T15:19:30`
`&order_id=1234567890`
**1\. 请求方法(GET 或 POST,WebSocket用GET),后面添加换行符 “\\n”**
例如:`GET\n`
**2\. 添加小写的访问域名,后面添加换行符 “\\n”**
例如:`api.sunx.io\n`
**3\. 访问方法的路径,后面添加换行符 “\\n”**
例如查询订单: `/sapi/v1/trade/order\n`
例如WebSocket v2 `/ws/v2`
**4\. 对参数进行URL编码,并且按照ASCII码顺序进行排序**
例如,下面是请求参数的原始顺序,且进行URL编码后
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`order_id=1234567890`
`SignatureMethod=HmacSHA256`
`SignatureVersion=2`
`Timestamp=2017-05-11T15%3A19%3A30`
使用 UTF-8 编码,且进行了 URL 编码,十六进制字符必须大写,如 “:” 会被编码为 “%3A” ,空格被编码为 “%20”。时间戳(Timestamp)需要以YYYY-MM-DDThh:mm:ss格式添加并且进行 URL 编码。时间戳有效时间5分钟。
经过排序之后
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`SignatureMethod=HmacSHA256`
`SignatureVersion=2`
`Timestamp=2017-05-11T15%3A19%3A30`
`order_id=1234567890`
**5\. 按照以上顺序,将各参数使用字符 “&” 连接**
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&order_id=1234567890`
**6\. 组成最终的要进行签名计算的字符串如下**
`GET\n`
`api.sunx.io`
`/sapi/v1/trade/order\n`
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&order_id=1234567890`
**7\. 用上一步里生成的 “请求字符串” 和你的密钥 (Secret Key) 生成一个数字签名**
1. 将上一步得到的请求字符串和 API 私钥作为两个参数,调用HmacSHA256哈希函数来获得哈希值。
2. 将此哈希值用base-64编码,得到的值作为此次接口调用的数字签名。
`4F65x5A2bLyMWVQj3Aqp+B4w+ivaA7n5Oi2SuYtCJ9o=`
**8\. 将生成的数字签名加入到请求里**
对于Rest接口:
1. 把所有必须的认证参数添加到接口调用的路径参数里
2. 把数字签名在URL编码后加入到路径参数里,参数名为“Signature”。
最终,发送到服务器的 API 请求应该为
[`https://api.sunx.io/sapi/v1/trade/order?AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&order_id=1234567890&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&Signature=4F65x5A2bLyMWVQj3Aqp%2BB4w%2BivaA7n5Oi2SuYtCJ9o%3D`](https://api.sunperp.com/sapi/v1/trade/order?AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&order_id=1234567890&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&Signature=4F65x5A2bLyMWVQj3Aqp%2BB4w%2BivaA7n5Oi2SuYtCJ9o%3D)
对于WebSocket接口:
1. 按照要求的JSON格式,填入参数和签名。
2. JSON请求中的参数不需要URL编码
例如:
`{ "action": "req", "ch": "auth", "params": { "authType":"api", "accessKey": "e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx", "signatureMethod": "HmacSHA256", "signatureVersion": "2.1", "timestamp": "2019-09-01T18:16:16", "signature": "4F65x5A2bLyMWVQj3Aqp+B4w+ivaA7n5Oi2SuYtCJ9o=" }}`
[上一页接口类型](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/jie-kou-lei-xing)
[下一页websocket心跳](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/kuai-su-kai-shi/websocket-xin-tiao)
最后更新于1个月前
---
# 阶梯限仓的梯度仓位 | 孙悟空
品种ID
档位
档位最小张数
档位最大张数
维持保证金率
最大杠杆倍数
AAVE-USDT
1
1
830
2%
30
AAVE-USDT
2
831
1600
2%
20
AAVE-USDT
3
1601
6600
2%
10
AAVE-USDT
4
6601
13000
3%
5
ADA-USDT
1
1
23000
2%
30
ADA-USDT
2
23001
29000
2%
20
ADA-USDT
3
29001
110000
2%
10
ADA-USDT
4
110001
230000
3%
5
ARB-USDT
1
1
50000
2%
30
ARB-USDT
2
50001
100000
2%
20
ARB-USDT
3
100001
400000
2%
10
ARB-USDT
4
400001
800000
3%
5
ASTER-USDT
1
1
25000
2%
20
ASTER-USDT
2
25001
100000
3%
10
ASTER-USDT
3
100001
200000
4%
5
AVAX-USDT
1
1
8100
2%
30
AVAX-USDT
2
8101
10000
2%
20
AVAX-USDT
3
10001
40000
2%
10
AVAX-USDT
4
40001
81000
3%
5
BCH-USDT
1
1
33000
2%
30
BCH-USDT
2
33001
41000
2%
20
BCH-USDT
3
41001
160000
2%
10
BCH-USDT
4
160001
330000
3%
5
BNB-USDT
1
1
57
1%
75
BNB-USDT
2
58
420
1%
50
BNB-USDT
3
421
2200
2%
30
BNB-USDT
4
2201
2800
2%
20
BNB-USDT
5
2801
11000
2%
10
BNB-USDT
6
11001
22000
3%
5
BTC-USDT
1
1
1600
1%
100
BTC-USDT
2
1601
3500
1%
75
BTC-USDT
3
3501
4400
1%
50
BTC-USDT
4
4401
6700
1%
30
BTC-USDT
5
6701
8900
2%
20
BTC-USDT
6
8901
13000
2%
10
BTC-USDT
7
13001
26000
3%
5
BTT-USDT
1
1
41000
2%
20
BTT-USDT
2
41001
160000
3%
10
BTT-USDT
3
160001
330000
4%
5
CRV-USDT
1
1
32000
2%
20
CRV-USDT
2
32001
120000
3%
10
CRV-USDT
3
120001
250000
4%
5
DOGE-USDT
1
1
8600
2%
30
DOGE-USDT
2
8601
10000
2%
20
DOGE-USDT
3
10001
43000
2%
10
DOGE-USDT
4
43001
86000
3%
5
ENA-USDT
1
1
16000
1%
50
ENA-USDT
2
16001
33000
2%
30
ENA-USDT
3
33001
66000
2%
20
ENA-USDT
4
66001
260000
2%
10
ENA-USDT
5
260001
530000
3%
5
ETH-USDT
1
1
41000
1%
100
ETH-USDT
2
41001
58000
1%
75
ETH-USDT
3
58001
69000
1%
50
ETH-USDT
4
69001
110000
1%
30
ETH-USDT
5
110001
170000
2%
20
ETH-USDT
6
170001
230000
2%
10
ETH-USDT
7
230001
460000
3%
5
FARTCOIN-USDT
1
1
33000
2%
20
FARTCOIN-USDT
2
33001
130000
3%
10
FARTCOIN-USDT
3
130001
260000
4%
5
HYPE-USDT
1
1
5200
2%
20
HYPE-USDT
2
5201
21000
3%
10
HYPE-USDT
3
21001
42000
4%
5
JST-USDT
1
1
83000
2%
20
JST-USDT
2
83001
330000
3%
10
JST-USDT
3
330001
660000
4%
5
LDO-USDT
1
1
21000
2%
30
LDO-USDT
2
21001
42000
2%
20
LDO-USDT
3
42001
160000
2%
10
LDO-USDT
4
160001
330000
3%
5
LINK-USDT
1
1
88000
2%
30
LINK-USDT
2
88001
110000
2%
20
LINK-USDT
3
110001
440000
2%
10
LINK-USDT
4
440001
880000
3%
5
LTC-USDT
1
1
17000
2%
30
LTC-USDT
2
17001
21000
2%
20
LTC-USDT
3
21001
86000
2%
10
LTC-USDT
4
86001
170000
3%
5
PENDLE-USDT
1
1
5300
2%
20
PENDLE-USDT
2
5301
21000
3%
10
PENDLE-USDT
3
21001
43000
4%
5
PENGU-USDT
1
1
4300
1%
30
PENGU-USDT
2
4301
8600
2%
20
PENGU-USDT
3
8601
17000
2%
10
PENGU-USDT
4
17001
68000
2%
5
PUMP-USDT
1
1
52000
2%
20
PUMP-USDT
2
52001
200000
3%
10
PUMP-USDT
3
200001
410000
4%
5
SEI-USDT
1
1
83000
2%
30
SEI-USDT
2
83001
160000
2%
20
SEI-USDT
3
160001
660000
2%
10
SEI-USDT
4
660001
1300000
3%
5
SOL-USDT
1
1
9700
2%
30
SOL-USDT
2
9701
12000
2%
20
SOL-USDT
3
12001
48000
2%
10
SOL-USDT
4
48001
97000
3%
5
SPX-USDT
1
1
21000
2%
20
SPX-USDT
2
21001
85000
3%
10
SPX-USDT
3
85001
170000
4%
5
SUI-USDT
1
1
58000
2%
30
SUI-USDT
2
58001
73000
2%
20
SUI-USDT
3
73001
290000
2%
10
SUI-USDT
4
290001
580000
3%
5
SUN-USDT
1
1
12000
2%
20
SUN-USDT
2
12001
50000
3%
10
SUN-USDT
3
50001
50000
4%
5
SUNDOG-USDT
1
1
8300
2%
20
SUNDOG-USDT
2
8301
33000
3%
10
SUNDOG-USDT
3
33001
66000
4%
5
TON-USDT
1
1
640000
2%
30
TON-USDT
2
640001
810000
2%
20
TON-USDT
3
810001
3200000
2%
10
TON-USDT
4
3200001
6400000
3%
5
TRUMP-USDT
1
1
14000
1%
50
TRUMP-USDT
2
14001
29000
2%
30
TRUMP-USDT
3
29001
59000
2%
20
TRUMP-USDT
4
59001
230000
2%
10
TRUMP-USDT
5
230001
470000
3%
5
TRX-USDT
1
1
6000
2%
30
TRX-USDT
2
6001
7500
2%
20
TRX-USDT
3
7501
30000
2%
10
TRX-USDT
4
30001
60000
3%
5
UNI-USDT
1
1
21000
2%
30
UNI-USDT
2
21001
26000
2%
20
UNI-USDT
3
26001
100000
2%
10
UNI-USDT
4
100001
210000
3%
5
WIN-USDT
1
1
50000
2%
20
WIN-USDT
2
50001
200000
3%
10
WIN-USDT
3
200001
400000
4%
5
XRP-USDT
1
1
6800
2%
30
XRP-USDT
2
6801
8600
2%
20
XRP-USDT
3
8601
34000
2%
10
XRP-USDT
4
34001
68000
3%
5
ZORA-USDT
1
1
34000
2%
20
ZORA-USDT
2
34001
130000
3%
10
ZORA-USDT
3
130001
270000
4%
5
[上一页交易规则](https://sunx.gitbook.io/sunx-cn/jiao-yi/jiao-yi-gui-ze)
[下一页合约信息](https://sunx.gitbook.io/sunx-cn/he-yue/he-yue-xin-xi)
最后更新于2个月前
---
# 基础信息 | 孙悟空
[获取合约信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi)
[获取合约指数信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi)
[获取合约最高限价和最低限价](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia)
[获取合约的资金费率](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l)
[获取合约的历史资金费率](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l)
[获取合约最高限价和最低限价](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1)
[查询联合保证金支持币种](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/cha-xun-lian-he-bao-zheng-jin-zhi-chi-bi-zhong)
[上一页Rest](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest)
[下一页获取合约信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi)
---
# 账户类 | 孙悟空
[查询账户余额](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e)
[组合查询用户财务记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu)
[查询用户当前的手续费费率](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l)
[上一页查询联合保证金支持币种](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/cha-xun-lian-he-bao-zheng-jin-zhi-chi-bi-zhong)
[下一页查询账户余额](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e)
最后更新于2个月前
---
# Websocket订阅 | 孙悟空
[私有频道](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao)
[公共频道](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao)
[上一页查看充提记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao/cha-kan-chong-ti-ji-lu)
[下一页私有频道](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao)
---
# 服务条款 | 孙悟空
[https://sun.io/docs/SUN\_Terms\_of\_Use\_en.pdf](https://sun.io/docs/SUN_Terms_of_Use_en.pdf)
[上一页社交媒体](https://sunx.gitbook.io/sunx-cn/guan-yu-wo-men/she-jiao-mei-ti)
[下一页隐私政策](https://sunx.gitbook.io/sunx-cn/guan-yu-wo-men/yin-si-zheng-ce)
---
# 社交媒体 | 孙悟空
Telegram:[https://t.me/SunX\_DEX](https://t.me/SunX_DEX)
Discord:[https://discord.gg/Az4jUBGf3E](https://discord.gg/Az4jUBGf3E)
孙悟空 X:[https://x.com/sunwukong\_DEX](https://x.com/sunwukong_DEX)
Tiktok:[https://www.tiktok.com/@sunx\_dex](https://www.tiktok.com/@sunx_dex)
Email:[support@sunx.io](mailto:support@sunx.io)
[上一页媒体工具包](https://sunx.gitbook.io/sunx-cn/pin-pai-yu-she-qu/mei-ti-gong-ju-bao)
[下一页服务条款](https://sunx.gitbook.io/sunx-cn/guan-yu-wo-men/fu-wu-tiao-kuan)
最后更新于1个月前
---
# Websocket交易 | 孙悟空
[Ws 合约批量下单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan)
[Ws 合约批量撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan)
[上一页订阅(sub)指数K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju)
[下一页Ws 合约批量下单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan)
---
# 获取合约指数信息 | 孙悟空
/sapi/v1/public/index
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 其他非行情类的公开接口,比如获取指数信息,限价信息,交割结算、平台持仓信息等,所有用户都是每个IP3秒最多240次请求(所有该IP的非行情类的公开接口请求共享3秒240次的额度)
接口描述: 该接口支持全仓模式和逐仓模式
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
false
指数代码
BTC-USDT,"ETH-USDT"...
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
status
string
true
请求处理结果
ok , "error"
object array
true
contract\_code
string
true
指数代码
BTC-USDT,"ETH-USDT"...
index\_price
decimal
true
指数价格
index\_ts
long
true
响应生成时间点,单位:毫秒
trade\_partition
string
true
参数已废弃
false
ts
long
true
时间戳,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi#cheng-gong-shi-li)
成功示例
[上一页获取合约信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi)
[下一页获取合约最高限价和最低限价](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi#qing-qiu-shi-li)
* [成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi#cheng-gong-shi-li)
复制
GET https://api.sunx.io/sapi/v1/public/index?contract_code=BTC-USDT
复制
{
"status": "ok",
"data": [{\
"index_price": 115881.748571428571428571,\
"index_ts": 1758006143000,\
"contract_code": "BTC-USDT",\
"trade_partition": "USDT"\
}],
"ts": 1758006143573
}
---
# 查询联合保证金支持币种 | 孙悟空
/sapi/v1/public/multi\_assets\_margin
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 每个IP3秒最多240次请求(所有该IP的非行情类的公开接口请求共享3秒240次的额度)
接口描述: 此接口用于查询联合保证金模式支持的币种。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/cha-xun-lian-he-bao-zheng-jin-zhi-chi-bi-zhong#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/cha-xun-lian-he-bao-zheng-jin-zhi-chi-bi-zhong#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
multi\_assets
list
true
联合保证金支持的币种
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/cha-xun-lian-he-bao-zheng-jin-zhi-chi-bi-zhong#qing-qiu-shi-li)
请求示例
复制
curl "https://api.sunx.io/sapi/v1/public/multi_assets_margin"
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/cha-xun-lian-he-bao-zheng-jin-zhi-chi-bi-zhong#xiang-ying-shi-li)
响应示例
[上一页获取合约最高限价和最低限价](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1)
[下一页账户类](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/cha-xun-lian-he-bao-zheng-jin-zhi-chi-bi-zhong#qing-qiu-di-zhi)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/cha-xun-lian-he-bao-zheng-jin-zhi-chi-bi-zhong#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/cha-xun-lian-he-bao-zheng-jin-zhi-chi-bi-zhong#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/cha-xun-lian-he-bao-zheng-jin-zhi-chi-bi-zhong#xiang-ying-shi-li)
复制
{
"code": 200,
"message": "Success",
"data": {
"multi_assets": [\
"USDT"\
]
},
"ts": 1757908198548
}
---
# 私有频道 | 孙悟空
[订阅账户变动数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju)
[订阅持仓变动数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju)
[订阅撮合后的订单数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju)
[订阅成交变动数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju)
[订阅订单数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju)
[上一页Websocket订阅](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue)
[下一页订阅账户变动数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju)
最后更新于2个月前
---
# 隐私政策 | 孙悟空
[https://sun.io/docs/SUN\_Privacy\_Policy\_en.pdf](https://sun.io/docs/SUN_Privacy_Policy_en.pdf)
[上一页服务条款](https://sunx.gitbook.io/sunx-cn/guan-yu-wo-men/fu-wu-tiao-kuan)
---
# 查询用户当前的手续费费率 | 孙悟空
/sapi/v1/account/fee\_rate
请求类型: POST
是否验签: 是
接口权限: 读取
限频: 每个UID 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该UID的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625。 pair、contract\_type和contract\_code同时填写,优先取contract\_code。 business\_type 在查询交割合约数据时为必填参数。且参数值要传:futures 或 all 。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
false
合约代码
永续:"BTC-USDT"... ,交割:“BTC-USDT-210625” ...
pair
string
false
交易对
BTC-USDT
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
status
string
true
请求处理结果
ok , "error"
ts
long
true
响应生成时间点,单位:毫秒
object array
true
symbol
string
true
品种代码
BTC,"ETH"...
contract\_code
string
true
合约代码
永续:"BTC-USDT"... ,交割:“BTC-USDT-210625” ...
open\_maker\_fee
string
true
开仓挂单的手续费费率,小数形式
open\_taker\_fee
string
true
开仓吃单的手续费费率,小数形式
close\_maker\_fee
string
true
平仓挂单的手续费费率,小数形式
close\_taker\_fee
string
true
平仓吃单的手续费费率,小数形式
fee\_asset
string
true
手续费币种
USDT...
contract\_type
string
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
pair
string
true
交易对
如:“BTC-USDT”
business\_type
string
true
业务类型
futures:交割、swap:永续
delivery\_fee
string
true
交割的手续费费率,小数形式
trade\_partition
string
true
参数已废弃
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l#cheng-gong-shi-li)
成功示例
[上一页组合查询用户财务记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu)
[下一页订单类](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l#qing-qiu-shi-li)
* [成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l#cheng-gong-shi-li)
复制
POST https://api.sunx.io/sapi/v1/account/fee_rate?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
复制
{
"status": "ok",
"data": [\
{\
"symbol": "BTC",\
"contract_code": "BTC-USDT",\
"open_maker_fee": "0.00015",\
"open_taker_fee": "0.0004",\
"close_maker_fee": "0.00015",\
"close_taker_fee": "0.0004",\
"fee_asset": "USDT",\
"delivery_fee": "0",\
"business_type": "swap",\
"contract_type": "swap",\
"pair": "BTC-USDT",\
"trade_partition": "USDT"\
}\
],
"ts": 1758009960093
}
---
# 查询账户余额 | 孙悟空
/sapi/v1/account/balance
请求类型: GET
是否验签: 是
接口权限: 读取
限频: 每个UID 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该UID的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用于联合保证金用户,查询合约账户信息。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
state
String
true
账户状态
1(normal):正常(交易,划转)、2(locked):-暂时未用到、3(bankruptcy):强平中,不允许交易、划转、收取资金费、4(BANKRUPTCY):暂时未用到 5(adl):adl中,不允许交易、收取资金费、划转、6(open\_limit):风控撤单中,合约交易只允许下减仓单,可以转入,不允许转出
equity
String
true
账户权益
initial\_margin
String
true
初始保证金
maintenance\_margin
String
true
维持保证金
maintenance\_margin\_rate
String
true
维持保证金率
profit\_unreal
String
true
未实现盈亏
available\_margin
String
true
可用保证金
voucher\_value
String
true
体验金(usdt)
created\_time
String
true
账户创建时间
updated\_time
String
true
账户更新时间
details
list
true
currency
String
true
币种
equity
String
true
该币种资产权益
available
String
true
该币种可用
withdraw\_available
String
true
该币种可转
profit\_unreal
String
true
未实现盈亏
initial\_margin
String
true
该币种初始保证金
maintenance\_margin
String
true
该币种维持保证金
maintenance\_margin\_rate
String
true
该币种维持保证金率
initial\_margin\_rate
String
true
该币种初始保证金率
voucher
String
true
体验金
voucher\_value
String
true
体验金(usdt)
created\_time
String
true
创建时间
updated\_time
String
true
更新时间
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e#xiang-ying-shi-li)
响应示例
[上一页账户类](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei)
[下一页组合查询用户财务记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e#xiang-ying-shi-li)
复制
GET https://api.sunx.io/sapi/v1/account/balance?SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
复制
{
"code": 200,
"message": "Success",
"data": {
"state": "normal",
"equity": "18.800687270666649522",
"details": [\
{\
"currency": "USDT",\
"equity": "18.800687270666649522",\
"available": "18.799987270666649522",\
"profit_unreal": "0.0007",\
"initial_margin": "0.01616",\
"maintenance_margin": "0.000002424",\
"maintenance_margin_rate": "0.000000128931456871",\
"initial_margin_rate": "0.000859543045812653",\
"voucher": "0",\
"voucher_value": "0",\
"withdraw_available": "18.784527270666649522",\
"created_time": 1757935751532,\
"updated_time": 1758006976344\
}\
],
"initial_margin": "0.01616",
"maintenance_margin": "0.000002424",
"maintenance_margin_rate": "0.000000128931456871",
"profit_unreal": "0.0007",
"available_margin": "18.784527270666649522",
"voucher_value": "0",
"created_time": 1757472792969,
"updated_time": 1758006976344
},
"ts": 1758006977098
}
---
# 组合查询用户财务记录 | 孙悟空
/sapi/v1/account/bill\_record
请求类型: POST
是否验签: 是
接口权限: 读取
限频: 每个UID 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该UID的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract支持交割合约代码调用,格式为:BTC-USDT-210625。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract
string
false
合约代码
支持大小写,"BTC-USDT" ...
mar\_acct
string
true
保证金账户
USDT
BTC-USDT,"USDT"(查询全仓时使用)...
type
string
false
不填查询全部类型,【查询多类型中间用,隔开】
3:平多; 4:平空; 5:开仓手续费-吃单; 6:开仓手续费-挂单; 7:平仓手续费-吃单; 8:平仓手续费-挂单; 9:交割平多; 10:交割平空; 11:交割手续费; 12:强制平多; 13:强制平空; 14:从币币转入; 15:转出至币币; 19:穿仓分摊; 26:系统; 28:活动奖励; 29:返利; 30:资金费-收入; 31:资金费-支出; 34:转出到子账号合约账户; 35:从子账号合约账户转入; 36:转出到母账号合约账户; 37:从母账号合约账户转入;38:从其他保证金账户转入 ;39:转出到其他保证金账户 ;85(系统垫资账户-用户U本位账户(转出垫资账户)) ;86(用户U本位账户-系统垫资发放账户 (转入垫资账户))
start\_time
long
false
查询开始时间, 以数据按创建时间进行查询
取值范围 \[((end-time) – 48h), (end-time)\] ,查询窗口最大为48小时,窗口平移范围为最近90天。
end\_time
long
false
查询结束时间, 以数据按创建时间进行查询
now
取值范围 \[(present-90d), present\] ,查询窗口最大为48小时,窗口平移范围为最近90天。
direct
string
false
查询方向, 方向为next时,数据按照时间正序排列返回,方向为prev时,数据按照时间倒序返回
next
prev表示向前查询,next表示向后查询。
from\_id
long
false
如果是向前(prev)查询,则赋值为上一次查询结果中得到的最小query\_id ;如果是向后(next)查询,则赋值为上一次查询结果中得到的最大query\_id
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
code
int
true
状态码(由具体业务自定义)
msg
string
true
状态码对应的描述信息
ts
long
true
响应生成时间点,单位:毫秒
object array
true
字典类型
query\_id
long
true
下次查询ID
id
long
true
ts
long
true
创建时间
asset
string
true
币种
USDT...
contract\_code
string
true
合约代码
BTC-USDT...
margin\_account
string
true
保证金账户
BTC-USDT,"USDT"...
face\_margin\_account
string
true
对手方保证金账户,仅在type交易类型为34、35、36、37、38、39时有值,其他类型为空字符串
BTC-USDT...
type
int
true
交易类型
3:平多; 4:平空; 5:开仓手续费-吃单; 6:开仓手续费-挂单; 7:平仓手续费-吃单; 8:平仓手续费-挂单; 9:交割平多; 10:交割平空; 11:交割手续费; 12:强制平多; 13:强制平空; 14:从币币转入; 15:转出至币币; 19:穿仓分摊; 26:系统; 28:活动奖励; 29:返利; 30:资金费-收入; 31:资金费-支出; 34:转出到子账号合约账户; 35:从子账号合约账户转入; 36:转出到母账号合约账户; 37:从母账号合约账户转入;38:从其他保证金账户转入 ;39:转出到其他保证金账户 ;85(系统垫资账户-用户U本位账户(转出垫资账户)) ;86(用户U本位账户-系统垫资发放账户 (转入垫资账户))
amount
decimal
true
金额(计价货币)
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu#xiang-ying-shi-li)
响应示例
[上一页查询账户余额](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-zhang-hu-yu-e)
[下一页查询用户当前的手续费费率](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/zu-he-cha-xun-yong-hu-cai-wu-ji-lu#xiang-ying-shi-li)
复制
POST https://api.sunx.io/sapi/v1/account/bill_record?SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"mar_acct":"USDT"
}
复制
{
"code": 200,
"msg": "",
"data": [\
{\
"query_id": 138798248,\
"id": 117840,\
"type": 5,\
"amount": -0.02446485,\
"ts": 1638758435635,\
"contract_code": "BTC-USDT",\
"asset": "USDT",\
"margin_account": "USDT",\
"face_margin_account": ""\
}\
],
"ts": 1604312615051
}
---
# 获取合约最高限价和最低限价 | 孙悟空
/sapi/v1/public/risk/limit
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 其他非行情类的公开接口,比如获取指数信息,限价信息,交割结算、平台持仓信息等,所有用户都是每个IP3秒最多240次请求(所有该IP的非行情类的公开接口请求共享3秒240次的额度)
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625。pair、contract\_type和contract\_code同时填写,优先取contract\_code。 business\_type 在查询交割合约数据时为必填参数。且参数值要传:futures 或 all 。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
false
合约代码
永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
pair
string
false
交易对
BTC-USDT
contract\_type
string
false
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
business\_type
string
false
业务类型,不填默认永续
futures:交割、swap:永续、all:全部
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
status
string
true
请求处理结果
ok
object array
true
symbol
string
true
品种代码
BTC,"ETH" ...
contract\_code
string
true
合约代码
如 永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
high\_limit
decimal
true
最高买价
low\_limit
decimal
true
最低卖价
contract\_type
string
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
pair
string
true
交易对
如:“BTC-USDT”
business\_type
string
true
业务类型
futures:交割、swap:永续
false
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia#cheng-gong-shi-li)
成功示例
[上一页获取合约指数信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi)
[下一页获取合约的资金费率](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia#qing-qiu-shi-li)
* [成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia#cheng-gong-shi-li)
复制
GET https://api.sunx.io/sapi/v1/public/risk/limit?contract_code=BTC-USDT
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"tier": 1,\
"max_lever": "200",\
"maintenance_margin_rate": "0.00385",\
"max_volume": "400",\
"min_volume": "1"\
},\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"tier": 2,\
"max_lever": "100",\
"maintenance_margin_rate": "0.005",\
"max_volume": "4000",\
"min_volume": "401"\
},\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"tier": 3,\
"max_lever": "50",\
"maintenance_margin_rate": "0.015",\
"max_volume": "8000",\
"min_volume": "4001"\
},\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"tier": 4,\
"max_lever": "30",\
"maintenance_margin_rate": "0.02",\
"max_volume": "120000",\
"min_volume": "8001"\
},\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"tier": 5,\
"max_lever": "20",\
"maintenance_margin_rate": "0.03",\
"max_volume": "500000",\
"min_volume": "120000"\
}\
],
"ts": 1740126940401
}
---
# 钱包 | 孙悟空
[发起提币请求](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao/fa-qi-ti-bi-qing-qiu)
[确认提币请求](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao/que-ren-ti-bi-qing-qiu)
[查看充提记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao/cha-kan-chong-ti-ji-lu)
[上一页获取实时预测资金费率的K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju)
[下一页发起提币请求](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao/fa-qi-ti-bi-qing-qiu)
---
# 公共频道 | 孙悟空
[订阅买一卖一逐笔行情推送](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song)
[订阅 Market Depth 数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju)
[订阅Market Depth增量数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju)
[订阅 KLine 数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju)
[订阅 Trade Detail 数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju)
[订阅(sub)指数K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju)
[上一页订阅订单数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju)
[下一页订阅买一卖一逐笔行情推送](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song)
---
# 错误代码 | 孙悟空
错误码
错误描述
500
系统错误
1010
用户不存在
1066
字段不能为空
1067
字段不合法
4010
暂未开启抵扣
4012
该品种不支持抵扣
4014
暂不支持设置手续费抵扣,请联系您的客户经理进行沟通。
6001
当前不支持单币种模式
6002
当前不支持联合保证金模式
6003
升级App以支持联合保证金模式
6004
ADL中,暂时无法切换保证金模式
6005
爆仓中,暂时无法切换保证金模式
6006
交易禁用中,暂时无法切换保证金模式
6007
模式切换中,请稍等
6008
资产模式切换失败
6009
有负资产,无法切换
6010
当前已设置为调整后的保证金模式,无需再次调整
6011
目前处于爆仓或者ADL中,暂时无法下单
6012
账户处于爆仓或者ADL中,请稍后再试
6013
仓位处于爆仓或者ADL中,请稍后再试
6014
当前不允许切换至联合保证金模式,如有疑问请联系客服
6015
当前不允许联合保证金模式下开仓,如有疑问请联系客服
6016
当前不允许联合保证金模式下平仓,如有疑问请联系客服
14610
当前多仓最多只能下({0}{1})的仓位,请修改后下单
14620
当前空仓最多只能下({0}{1})的仓位,请修改后下单
4013
您好,老版合约网格即将下线,无法创建。请切换至交易机器人体验新版合约网格。
50222
Fireblocks子账号暂不支持此功能
50224
暂不支持此功能
50225
请先创建Fireblocks CVA地址
50226
托管子账户不支持此操作
6021
错误码
错误描述
500
系统错误
1010
用户不存在
1066
字段不能为空
1067
字段不合法
4010
暂未开启抵扣
4012
该品种不支持抵扣
4014
暂不支持设置手续费抵扣,请联系您的客户经理进行沟通。
6001
当前不支持单币种模式
6002
当前不支持联合保证金模式
6003
升级App以支持联合保证金模式
6004
ADL中,暂时无法切换保证金模式
6005
爆仓中,暂时无法切换保证金模式
6006
交易禁用中,暂时无法切换保证金模式
6007
模式切换中,请稍等
6008
资产模式切换失败
6009
有负资产,无法切换
6010
当前已设置为调整后的保证金模式,无需再次调整
6011
目前处于爆仓或者ADL中,暂时无法下单
6012
账户处于爆仓或者ADL中,请稍后再试
6013
仓位处于爆仓或者ADL中,请稍后再试
6014
当前不允许切换至联合保证金模式,如有疑问请联系客服
6015
当前不允许联合保证金模式下开仓,如有疑问请联系客服
6016
当前不允许联合保证金模式下平仓,如有疑问请联系客服
14610
当前多仓最多只能下({0}{1})的仓位,请修改后下单
14620
当前空仓最多只能下({0}{1})的仓位,请修改后下单
4013
您好,老版合约网格即将下线,无法创建。请切换至交易机器人体验新版合约网格。
50222
Fireblocks子账号暂不支持此功能
50224
暂不支持此功能
50225
请先创建Fireblocks CVA地址
50226
托管子账户不支持此操作
6021
接口超时,请稍后重试
接口超时,请稍后重试
[上一页Ws 合约批量撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan)
[下一页媒体工具包](https://sunx.gitbook.io/sunx-cn/pin-pai-yu-she-qu/mei-ti-gong-ju-bao)
最后更新于2个月前
---
# 获取合约的资金费率 | 孙悟空
/sapi/v1/public/funding\_rate
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 其他非行情类的公开接口,比如获取指数信息,限价信息,交割结算、平台持仓信息等,所有用户都是每个IP3秒最多240次请求(所有该IP的非行情类的公开接口请求共享3秒240次的额度)
接口描述: 该接口支持全仓模式和逐仓模式
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码
BTC-USDT …
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
status
string
true
请求处理结果
ok , "error"
ts
long
true
响应生成时间点,单位:毫秒
object
true
symbol
string
true
品种代码
contract\_code
string
true
合约代码
BTC-USDT ...
fee\_asset
string
true
资金费币种
USDT...
funding\_time
string
true
当期资金费率时间
funding\_rate
string
true
当期资金费率 (一分钟计算一次)
estimated\_rate
string
true
下一期预测资金费率(废弃,默认为null)
next\_funding\_time
string
true
下一期资金费率时间(废弃,默认为null)
trade\_partition
string
true
参数已废弃
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l#xiang-ying-shi-li)
响应示例
[上一页获取合约最高限价和最低限价](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia)
[下一页获取合约的历史资金费率](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l#xiang-ying-shi-li)
复制
curl "https://api.sunx.io/sapi/v1/public/funding_rate?contract_code=BTC-USDT"
复制
{
"status": "ok",
"data": {
"estimated_rate": null,
"funding_rate": "0.000100000000000000",
"contract_code": "BTC-USDT",
"symbol": "BTC",
"fee_asset": "USDT",
"funding_time": "1758009600000",
"next_funding_time": null,
"trade_partition": "USDT"
},
"ts": 1758006390362
}
---
# 获取合约的历史资金费率 | 孙悟空
/sapi/v1/public/funding\_rate\_history
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 其他非行情类的公开接口,比如获取指数信息,限价信息,交割结算、平台持仓信息等,所有用户都是每个IP3秒最多240次请求(所有该IP的非行情类的公开接口请求共享3秒240次的额度)
接口描述: 该接口支持全仓模式和逐仓模式
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
page\_index
int
false
页码,不填默认第1页
page\_size
int
false
不填默认20,不得多于50
contract\_code
string
true
合约代码
BTC-USDT等
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
status
string
true
请求处理结果
ok , "error"
ts
long
true
响应生成时间点,单位:毫秒
object
true
symbol
string
true
品种代码
contract\_code
string
true
合约代码
BTC-USDT ...
fee\_asset
string
true
资金费币种
USDT...
funding\_time
string
true
资金费率时间
funding\_rate
string
true
当期资金费率
realized\_rate
string
true
实际资金费率(废弃,默认为null)
avg\_premium\_index
string
true
平均溢价指数
false
total\_page
int
true
总页数
current\_page
int
true
当前页
total\_size
int
true
总条数
trade\_partition
string
true
参数已废弃
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l#xiang-ying-shi-li)
响应示例
[上一页获取合约的资金费率](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-zi-jin-fei-l)
[下一页获取合约最高限价和最低限价](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l#xiang-ying-shi-li)
复制
curl "https://api.sunx.io/sapi/v1/public/funding_rate_history?contract_code=BTC-USDT"
复制
{
"status": "ok",
"data": {
"total_page": 1,
"current_page": 1,
"total_size": 3,
"data": [{\
"avg_premium_index": "-0.000129806166799078",\
"trade_partition": "USDT",\
"funding_rate": "0.000100000000000000",\
"realized_rate": null,\
"funding_time": "1757980800000",\
"contract_code": "BTC-USDT",\
"symbol": "BTC",\
"fee_asset": "USDT"\
}, {\
"avg_premium_index": "-0.000033768740337556",\
"trade_partition": "USDT",\
"funding_rate": "0.000100000000000000",\
"realized_rate": null,\
"funding_time": "1757952000000",\
"contract_code": "BTC-USDT",\
"symbol": "BTC",\
"fee_asset": "USDT"\
}]
},
"ts": 1758006694468
}
---
# 持仓类 | 孙悟空
[查询当前持仓](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang)
[查询杠杆等级列表](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao)
[设置杠杆等级](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji)
[查询持仓模式](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi)
[设置持仓模式](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi)
[查询持仓风险限额](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e)
[用户持仓量限制的查询](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun)
[上一页查询用户当前的下单量限制](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi)
[下一页查询当前持仓](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang)
---
# 媒体工具包 | 孙悟空
在使用 孙悟空 品牌素材时,请遵循以下准则:
所有 孙悟空 品牌素材均受版权保护。使用前请务必获得 孙悟空 的许可。
尽可能将我们的品牌素材超链接至Aster官方网站及X(Twitter)官方社交媒体渠道。
宣布官方合作伙伴关系时请使用我们的品牌素材。
请避免以下行为:
不得在未获得我们同意的情况下,尤其为推广自身项目而使用 孙悟空 品牌素材。
不得将孙悟空 任何品牌元素(标识、视觉素材、色彩等)改作其他用途。
联系我们
如有关于 孙悟空 品牌素材使用的任何疑问,或寻求合作伙伴关系、经纪业务咨询、网红合作及推荐计划机会,请联系support@sunperp.com
**品牌颜色代码:**


**孙悟空 核心模式:**


**LOGO:**




17KB
[logo.rar](https://4289016733-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2iWuuWL6k6J1cpi9pALC%2Fuploads%2FatUy5Xaubo1reTKB0upL%2Flogo.rar?alt=media&token=16d26d3a-d885-4bb4-a32f-3b044afa740a)
下载[打开](https://4289016733-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2iWuuWL6k6J1cpi9pALC%2Fuploads%2FatUy5Xaubo1reTKB0upL%2Flogo.rar?alt=media&token=16d26d3a-d885-4bb4-a32f-3b044afa740a)
**孙悟空 Logo 禁用标识:**


[上一页错误代码](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/cuo-wu-dai-ma)
[下一页社交媒体](https://sunx.gitbook.io/sunx-cn/guan-yu-wo-men/she-jiao-mei-ti)
最后更新于1个月前
---
# 获取合约最高限价和最低限价 | 孙悟空
####
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1#sapi-v1-public-price_limit)
/sapi/v1/public/price\_limit
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 其他非行情类的公开接口,比如获取指数信息,限价信息,交割结算、平台持仓信息等,所有用户都是每个IP3秒最多240次请求(所有该IP的非行情类的公开接口请求共享3秒240次的额度)
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625。pair、contract\_type和contract\_code同时填写,优先取contract\_code。 business\_type 在查询交割合约数据时为必填参数。且参数值要传:futures 或 all 。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
false
合约代码
永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
pair
string
false
交易对
BTC-USDT
contract\_type
string
false
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
business\_type
string
false
业务类型,不填默认永续
futures:交割、swap:永续、all:全部
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
status
string
true
请求处理结果
ok
object array
true
symbol
string
true
品种代码
BTC,"ETH" ...
contract\_code
string
true
合约代码
如 永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
high\_limit
decimal
true
最高买价
low\_limit
decimal
true
最低卖价
contract\_type
string
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
pair
string
true
交易对
如:“BTC-USDT”
business\_type
string
true
业务类型
futures:交割、swap:永续
trade\_partition
string
true
参数已废弃
false
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1#xiang-ying-shi-li)
响应示例
[上一页获取合约的历史资金费率](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-de-li-shi-zi-jin-fei-l)
[下一页查询联合保证金支持币种](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/cha-xun-lian-he-bao-zheng-jin-zhi-chi-bi-zhong)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zui-gao-xian-jia-he-zui-di-xian-jia-1#xiang-ying-shi-li)
复制
curl "https://api.sunx.io/sapi/v1/public/price_limit?contract_code=BTC-USDT"
复制
{
"status": "ok",
"data": [{\
"symbol": "BTC",\
"contract_code": "BTC-USDT",\
"high_limit": 121563.500000000000000000000000000000000000,\
"low_limit": 109986.100000000000000000000000000000000000,\
"business_type": "swap",\
"pair": "BTC-USDT",\
"contract_type": "swap",\
"trade_partition": "USDT"\
}],
"ts": 1758006886072
}
---
# 获取合约信息 | 孙悟空
####
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi#sapi-v1-public-contract_info)
**/sapi/v1/public/contract\_info**
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 其他非行情类的公开接口,比如获取指数信息,限价信息,交割结算、平台持仓信息等,所有用户都是每个IP3秒最多240次请求(所有该IP的非行情类的公开接口请求共享3秒240次的额度)
接口描述: 该接口支持全仓模式和逐仓模式 请求参数 support\_margin\_mode 在查询同时支持全仓模式和逐仓模式的合约品种时需要使用 all 。使用cross 或 isolated 只能查询到只支持全仓模式或逐仓模式的合约品种,不能查询到两种模式都支持的合约品种。请悉知。 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625。pair、contract\_type和contract\_code同时填写,优先取contract\_code。 business\_type 在查询交割合约数据时为必填参数。且参数值要传:futures 或 all 。 当support\_margin\_mode为逐仓模式时,contract\_type,business\_type 不可传交割的类型。当support\_margin\_mode为全仓模式时,查询出来的都是交割合约的数据。 备注:合约要素接口,可展示更多合约字段信息,推荐您使用。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
false
合约代码
永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
support\_margin\_mode
string
false
合约支持的保证金模式
cross:仅支持全仓模式;isolated:仅支持逐仓模式;all:全逐仓都支持
pair
string
false
交易对
BTC-USDT
contract\_type
string
false
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
business\_type
string
false
业务类型,不填默认永续
futures:交割、swap:永续、all:全部
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
status
string
true
请求处理结果
ok , "error"
object array
true
symbol
string
true
品种代码
BTC,"ETH"...
contract\_code
string
true
合约代码
永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
contract\_size
decimal
true
合约面值,即1张合约对应多少标的币种(如BTC-USDT合约则面值单位就是BTC)
0.1,0.01...
price\_tick
decimal
true
合约价格最小变动精度
0.001, 0.01...
settlement\_date
string
true
合约下次结算时间
时间戳,如"1490759594752"
delivery\_time
string
true
交割时间(合约无需交割时,该字段值为空字符串),单位:毫秒
create\_date
string
true
合约上市日期
如"20180706"
contract\_status
int
true
合约状态
合约状态: 0:已下市、1:上市、2:待上市、3:停牌,4:待开盘、6:交割中、8:交割完成
support\_margin\_mode
string
true
合约支持的保证金模式
cross:全仓模式;isolated:逐仓模式;all:全逐仓都支持
contract\_type
string
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
pair
string
true
交易对
如:“BTC-USDT”
business\_type
string
true
业务类型
futures:交割、swap:永续
delivery\_date
string
true
合约交割日期,永续无需交割时该字段为空字符串
如"20180720"
adjust
object array
false
无效字段
price\_estimated
object array
false
无效字段
open\_type
int
false
无效字段
trade\_partition
string
true
参数已废弃
false
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi#xiang-ying-shi-li)
响应示例
[上一页基础信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi)
[下一页获取合约指数信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-zhi-shu-xin-xi)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ji-chu-xin-xi/huo-qu-he-yue-xin-xi#xiang-ying-shi-li)
复制
GET https://api.sunx.io/sapi/v1/public/contract_info?contract_code=BTC-USDT
复制
{
"status": "ok",
"data": [{\
"symbol": "BTC",\
"contract_code": "BTC-USDT",\
"contract_size": 0.001000000000000000,\
"price_tick": 0.100000000000000000,\
"delivery_date": "",\
"delivery_time": "",\
"create_date": "20250910",\
"contract_status": 1,\
"adjust": [],\
"price_estimated": [],\
"settlement_date": "1758009600000",\
"support_margin_mode": "all",\
"open_type": 0,\
"business_type": "swap",\
"pair": "BTC-USDT",\
"contract_type": "swap",\
"trade_partition": "USDT"\
}],
"ts": 1758005786211
}
---
# Ws 合约批量撤单 | 孙悟空
####
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#cancel_batch_orders)
cancel\_batch\_orders
是否验签: 是
接口权限: 交易
限频: 共享REST限频次数。
接口描述: 该接口支持websocket合约批量撤单。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/trade
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/trade
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#ding-yue-can-shu)
订阅参数
字段名称
类型
说明
op
string
必填;操作名称为 cancel\_batch\_orders;
cid
string
选填; 请求唯一 ID
data
string
撤单的参数
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
false
contract\_code
String
true
合约代码
order\_id
array
false
订单ID
client\_order\_id
array
false
客户订单ID
\[1-9223372036854775807\]
false
cid
string
false
表示本次请求id
备注: 备注:order\_id和client\_order\_id必须传一个,若两个都传,已order\_id为准。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#fan-hui-can-shu)
返回参数
参数
数据类型
是否必填
描述
取值范围
code
int
true
响应编码
200:成功、非200:失败
message
string
true
响应描述
false
code
int
true
订单撤单结果
200:成功、非200:失败
message
string
true
订单撤单结果描述
order\_id
string
true
订单ID
client\_order\_id
string
true
客户订单ID
false
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#ding-yue-cheng-gong-shi-li)
订阅成功示例
[上一页Ws 合约批量下单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan)
[下一页错误代码](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/cuo-wu-dai-ma)
最后更新于19天前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#ding-yue-di-zhi)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#ding-yue-can-shu)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#qing-qiu-can-shu)
* [返回参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#fan-hui-can-shu)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan#ding-yue-cheng-gong-shi-li)
复制
{
"op": "cancel_batch_orders",
"cid": "cancel_batch_orders_1240",
"data": {
"contract_code": "BTC-USDT",
"order_id": [\
"1329854623927160832",\
"1329854624082350080"\
],
"client_order_id": [\
"1329854623927160832",\
"1329854624082350080"\
]
}
}
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"orderId": "1358944125296009216",\
"clientOrderId": "1358944125296009216",\
"code": 200,\
"message": "Success"\
},\
{\
"orderId": "1358944503467040768",\
"clientOrderId": "1358944503467040768",\
"code": 200,\
"message": "Success"\
}\
],
"ts": 1744041034439,
"cid": "cancel_batch_orders_1240"
}
---
# 订单类 | 孙悟空
[下单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan)
[批量下单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan)
[撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan)
[批量撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan)
[全部撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan)
[市价全平](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping)
[一键全平](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping)
[查询当前委托](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo)
[查询成交明细](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi)
[查询历史委托](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo)
[查询订单信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi)
[查询用户当前的下单量限制](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi)
[上一页查询用户当前的手续费费率](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/zhang-hu-lei/cha-xun-yong-hu-dang-qian-de-shou-xu-fei-fei-l)
[下一页下单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan)
---
# 确认提币请求 | 孙悟空
/sapi/v1/sunx/dw/withdraw/confirm
是否验签: 是
接口权限: 提币
接口描述: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 确认提币请求
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao/que-ren-ti-bi-qing-qiu#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
**请求参数**
nonce
string
true
Nonce值
值为发起提币请求接口中返回的值
signature
string
true
签名
**响应参数**
status
string
true
返回状态
"ok" 或 "error"
error-code
string
false
错误码
error-msg
string
false
错误消息
object
true
order-id
long
true
提币订单ID
status
string
true
提币状态
"Verifying":确认中
"Processing":处理中
"Failed":失败
false
**注意:**
* 需要在请求头中添加 'CLOUD-EXCHANGE: 6X2K9L4V1C'
* API签名的字符串不包含"/sapi/v1"的部分,只有 "/sunx/dw/xxx" 部分被考虑
**请求示例**
**返回示例**
[上一页发起提币请求](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao/fa-qi-ti-bi-qing-qiu)
[下一页查看充提记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao/cha-kan-chong-ti-ji-lu)
最后更新于15天前
复制
POST https://api.sunperp.io/sapi/v1/sunx/dw/withdraw/confirm?SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"signature": "0xec4627c60521fa3dfce2cd3de1c38729f60c9d491075bb2845940666f4c7e09e76ba054b96e6c0d48efa41b22ccdc24dfe7aeb70b10fa0fa695e090309798b971c",
"nonce": "85A6B8F36D591055"
}
复制
{
"status": "ok",
"data": {
"order-id": 161234584,
"status": "Processing"
}
}
---
# 发起提币请求 | 孙悟空
/sapi/v1/sunx/dw/withdraw/apply
请求类型: POST
是否验签: 是
接口权限: 提币
接口描述: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 发起提币请求
**请求地址**
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
**请求参数**
address
string
是
提币地址
应该为一个充值地址
currency
string
true
币种
如:usdt
chain
string
true
链
如:trc20usdt
amount
string
true
提币数量
fee
string
true
提币手续费
对于trc20usdt,手续费为0
**响应参数**
status
string
true
返回状态
"ok" 或 "error"
error-code
string
false
错误码
error-msg
string
false
错误消息
object
true
nonce
string
true
后端会生成一个随机数。这个随机数对应用户唯一,并用于标记提现请求。
32位长度的字符串,格式为 \[0-9a-zA-Z\]
content
string
true
需要用户签名的原始文本,其内容是在输入参数中加入随机数参数后进行序列化。
expired-at
long
true
随机数过期时间戳,当前时间 + 120 秒。
false
**注意:**
* 需要在请求头中添加 'CLOUD-EXCHANGE: 6X2K9L4V1C'
* API签名的字符串不包含"/sapi/v1"的部分,只有 "/sunx/dw/xxx" 部分被考虑
**请求示例**
返回示例
[上一页钱包](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao)
[下一页确认提币请求](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao/que-ren-ti-bi-qing-qiu)
最后更新于15天前
复制
POST https://api.sunperp.io/sapi/v1/sunx/dw/withdraw/apply?SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"address": "TN1F755kgPevmwJZLUqbSaLfMmnVEz1EbV",
"amount": "8.799999",
"chain": "trc20usdt",
"currency": "usdt",
"fee": "0"
}
复制
{
"status": "ok",
"data": {
"nonce": "85A6B8F36D591055",
"content": "address:TN1F755kgPevmwJZLUqbSaLfMmnVEz1EbV,currency:usdt,chain:trc20usdt,amount:8.799999,fee:1.2,nonce:85A6B8F36D591055",
"expired-at": 1757320137392
}
}
---
# 设置持仓模式 | 孙悟空
/sapi/v1/position/mode
请求类型: POST
是否验签: 是
接口权限: 交易
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
position\_mode
string
true
持仓模式
single\_side:单向持仓;dual\_side:双向持仓
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
position\_mode
string
true
持仓模式
single\_side:单向持仓;dual\_side:双向持仓
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi#qing-qiu-shi-li)
请求示例
复制
POST https://api.sunx.io/sapi/v1/position/risk/limit?margin_mode=cross&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"position_mode": "dual_side"
}
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi#xiang-ying-shi-li)
响应示例
[上一页查询持仓模式](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi)
[下一页查询持仓风险限额](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi#xiang-ying-shi-li)
复制
{
"code": 200,
"message": "Success",
"data": {
"position_mode": "dual_side"
},
"ts": 1740463132267
}
---
# 设置杠杆等级 | 孙悟空
/sapi/v1/position/lever
请求类型: POST
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用户查询出杠杆等级的列表
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
true
合约代码
"BTC-USDT","ETH-USDT"……
margin\_mode
String
true
保证金模式
cross:全仓
lever\_rate
String
true
杠杆等级
目标杠杆等级
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
contract\_code
String
true
合约代码
"BTC-USDT","ETH-USDT"……
margin\_mode
String
true
保证金模式
cross:全仓
lever\_rate
String
true
杠杆等级
目标杠杆等级
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji#xiang-ying-shi-li)
响应示例
[上一页查询杠杆等级列表](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao)
[下一页查询持仓模式](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji#xiang-ying-shi-li)
复制
POST https://api.sunx.io/sapi/v1/position/lever?margin_mode=cross&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"contract_code": "BTC-USDT",
"margin_mode": "cross",
"lever_rate": 5
}
复制
{
"code": 200,
"message": "Success",
"data": {
"contract_code": "BTC-USDT",
"margin_mode": "cross",
"lever_rate": 5
},
"ts": 1740452492265
}
---
# 查询持仓模式 | 孙悟空
/sapi/v1/position/mode
请求类型: GET
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用户查询当前的持仓模式。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
position\_mode
string
true
持仓模式
single\_side:单向持仓;dual\_side:双向持仓
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi#qing-qiu-shi-li)
请求示例
复制
GET https://api.sunx.io/sapi/v1/position/mode?margin_mode=cross&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi#xiang-ying-shi-li)
响应示例
[上一页设置杠杆等级](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji)
[下一页设置持仓模式](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-mo-shi#xiang-ying-shi-li)
复制
{
"code": 200,
"message": "Success",
"data": {
"position_mode": "dual_side"
},
"ts": 1740453311795
}
---
# 行情数据 | 孙悟空
[获取行情深度数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju)
[获取K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju)
[获取聚合行情](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing)
[获取市场最近成交记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu)
[获取市场最优挂单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan)
[批量获取最近的交易记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu)
[获取标记价格的K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju)
[获取合约的溢价指数K线](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian)
[获取实时预测资金费率的K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju)
[上一页用户持仓量限制的查询](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun)
[下一页获取行情深度数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju)
---
# 订阅买一卖一逐笔行情推送 | 孙悟空
market.$contract\_code.bbo
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: websocket:req请求,同一时刻最多请求50次;sub请求,无限制,服务器主动推送数据
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/market
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/market
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#qing-qiu-can-shu)
请求参数
字段名称
类型
说明

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#gui-ze-shuo-ming)
规则说明
订阅(sub)
取消订阅(unsub)
规则

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#ding-yue-can-shu)
订阅参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码 或 合约标识
永续:BTC-USDT(永续合约代码) ,交割:BTC-USDT-210625(交割合约代码) 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#shu-ju-geng-xin)
数据更新
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.$contract\_code.bbo
ts
long
true
响应生成时间点,单位:毫秒(指接口响应时间)
object
true
ch
string
true
数据所属的 channel,格式: market.$contract\_code.bbo
mrid
string
true
订单ID
id
long
true
tick ID
ask
array
false
卖一盘,\[price(挂单价), vol(此价格挂单张数)\]
bid
array
false
买一盘,\[price(挂单价), vol(此价格挂单张数)\]
version
long
true
版本号
ts
long
true
响应生成时间点,单位:毫秒(指数据生成时间)
false
备注: 当买一价、买一量、卖一价、卖一量,其中任一数据发生变化时,进行逐笔推送; 如果同一时刻有多个买一卖一的价格/单量的变化,直接用最新的买一卖一进行推送,直接丢弃中间结果; 由于客户端网络等原因导致接收数据失败,服务端会丢弃旧的队列数据; version(版本号),直接取撮合id,保证全局唯一并且最新的推送版本号都是数值最大的。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#ding-yue-cheng-gong-shi-li)
订阅成功示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#shu-ju-geng-xin-shi-li)
数据更新示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#qu-xiao-ding-yue-shi-li)
取消订阅示例
[上一页公共频道](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao)
[下一页订阅 Market Depth 数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju)
最后更新于1个月前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#ding-yue-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#qing-qiu-can-shu)
* [规则说明](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#gui-ze-shuo-ming)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#ding-yue-can-shu)
* [数据更新](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#shu-ju-geng-xin)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#ding-yue-cheng-gong-shi-li)
* [数据更新示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#shu-ju-geng-xin-shi-li)
* [取消订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song#qu-xiao-ding-yue-shi-li)
复制
{
"sub": "market.BTC-USDT.bbo",
"id": "id8"
}
复制
{
"id": "id8",
"status": "ok",
"subbed": "market.BTC-USDT.bbo",
"ts": 1489474081631
}
复制
{
"ch": "market.BTC-USDT.bbo",
"ts": 1603707934525,
"tick": {
"mrid": 131599726,
"id": 1603707934,
"bid": [\
13064,\
38\
],
"ask": [\
13072.3,\
205\
],
"ts": 1603707934525,
"version": 131599726,
"ch": "market.BTC-USDT.bbo"
}
}
复制
{
"unsub": "market.BTC-USDT.bbo",
"id": "id8"
}
---
# 查询持仓风险限额 | 孙悟空
/sapi/v1/position/risk/limit
请求类型: GET
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制)
接口描述: 查询当前持有的合约持仓风险限额阶梯信息
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
false
合约代码
"BTC-USDT","ETH-USDT20241109"……
margin\_mode
String
false
保证金模式
cross:全仓
position\_side
String
false
仓位方向
long:多,short:空,both:单向持仓
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
contract\_code
String
true
合约代码
"BTC-USDT","ETH-USDT20241109"……
margin\_mode
String
true
保证金模式
cross:全仓
position\_side
String
true
仓位方向
long:多,short:空,both:单向持仓
max\_lever
String
true
该层最大杠杆等级
maintenance\_margin\_rate
String
true
该层维持保证率
max\_volume
String
true
该层最高持有张数
min\_volume
String
true
该层最低持有张数
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e#xiang-ying-shi-li)
响应示例
[上一页设置持仓模式](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-chi-cang-mo-shi)
[下一页用户持仓量限制的查询](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e#xiang-ying-shi-li)
复制
GET https://api.sunx.io/sapi/v1/position/risk/limit?contract_code=BTC-USDT&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"position_side": "short",\
"max_lever": "200",\
"maintenance_margin_rate": "0.003850000000000000",\
"max_volume": "400.000000000000000000",\
"min_volume": "1.000000000000000000"\
}\
],
"ts": 1740453921437
}
---
# 查看充提记录 | 孙悟空
[/sapi/v1/sunperp/dw/query/deposit-withdraw](https://mulan-ams-dw.global-base.tc-jp1.huobiapps.com/swagger-ui.html#!/sun-perp-query-api-controller/queryDepositWithdrawUsingGET_2)
是否验签: 是
请求类型: GET
接口权限: 提币
接口描述: 每个UID 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该UID的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 确认提币请求
请求参数
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
currency
string
false
币种
btc, ltc, bch, eth, etc ...(取值参考GET /v1/common/currencys)
type
string
true
充值或提币
deposit 或 withdraw,子用户仅可用deposit
from
string
false
查询起始 ID
缺省时,默认值direct相关。当direct为‘prev’时,from 为1 ,从旧到新升序返回;当direct为’next‘时,from为最新的一条记录的ID,从新到旧降序返回
size
string
false
查询记录大小
\[1-50\]
50
direct
string
false
返回记录排序方向
“prev” (升序)or “next” (降序)
direcet 缺省时,缺省时,默认为"next" (降序)
响应参数
status
string
true
请求返回状态
"ok" or "error"
error-code
string
false
提币失败错误码,仅type为”withdraw“,且state为”reject“、”wallet-reject“和”failed“时有。
error-msg
string
false
提币失败错误描述,仅type为”withdraw“,且state为”reject“、”wallet-reject“和”failed“时有。
object
true
id
long
true
充币或者提币订单id,翻页查询时from参数取自此值
type
string
true
类型
'deposit', 'withdraw', 子用户仅有deposit
currency
string
true
币种
tx-hash
string
true
交易哈希。如果是“快速提币”,则提币不通过区块链,该值为空。
chain
string
true
链名称
amount
float
true
个数
address
string
true
目的地址
address-tag
string
true
地址标签
fee
float
true
手续费
state
string
true
状态
虚拟币充值状态
unknown:状态未知,confirming:区块确认中,confirmed:区块已完成,已经上账,可以划转和交易\];虚拟币提币状态\[verifying:待验证,failed:验证失败,submitted:已提交,reexamine:审核中,canceled,已撤销,pass:审批通过,reject:审批拒绝,pre-transfer:处理中,wallet-transfer:已汇出,wallet-reject:钱包拒绝,confirmed:区块已确认,confirm-error:区块确认错误,repealed:已撤销\]safe:区块已确认,可以提币orphan:区块已被孤立,risk-action-fail:风控验证失败,risk-action-timeout:风控动作超时
created-at
long
true
发起时间
updated-at
long
true
最后更新时间
sub-type
string
true
无效字段
request-id
string
true
无效字段
chain-full-name
string
true
无效字段
from-addr-tag
string
true
无效字段
address-id
string
true
无效字段
wallet-confirm
string
true
无效字段
false
注意:
* 需要在请求头中添加 'CLOUD-EXCHANGE: 6X2K9L4V1C'
* API签名的字符串不包含"/sapi/v1"的部分,只有 "/sunperp/dw/xxx" 部分被考虑
请求示例
返回示例
[上一页确认提币请求](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao/que-ren-ti-bi-qing-qiu)
[下一页Websocket订阅](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue)
最后更新于15天前
复制
GET /sapi/v1/sunperp/dw/query/deposit-withdraw?SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-12-23T07%3A08%3A24&type=deposit
复制
{
"status": "ok",
"data": [\
{\
"id": 161234626,\
"type": "deposit",\
"sub-type": "SUN_PERP_USER_DEPOSIT",\
"request-id": "trc20usdt-500e802ba8ece8f0022c876109132d601fb7211e0ca406da87f08440b6f19d07-201",\
"currency": "usdt",\
"chain": "trc20usdt",\
"chain-full-name": "TRON",\
"tx-hash": "500e802ba8ece8f0022c876109132d601fb7211e0ca406da87f08440b6f19d07",\
"amount": 18.8,\
"from-addr-tag": "",\
"address-id": 0,\
"address": "TEubMt2TNag5NN1JXVaeysUk8GNTTYmtVX",\
"address-tag": "",\
"fee": 0,\
"state": "safe",\
"wallet-confirm": 20,\
"created-at": 1757935674710,\
"updated-at": 1757935745174\
}\
]
}
---
# 一键全平 | 孙悟空
/sapi/v1/trade/position\_all
请求类型: POST
是否验签: 是
接口权限: 交易
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用于市价卖出所有的持仓
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
线上环境
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
order\_id
String
true
订单ID\[全局唯一\]
client\_order\_id
String
false
用户自己的订单id
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping#xiang-ying-shi-li)
响应示例
[上一页市价全平](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping)
[下一页查询当前委托](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping#xiang-ying-shi-li)
复制
POST https://api.sunx.io/sapi/v1/trade/position_all?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
复制
{
"code": 200,
"data": [\
{\
"client_order_id": 1339201278633681000,\
"code": 200,\
"message": "Success",\
"order_id": 1339201278633681000\
}\
],
"message": "Success",
"ts": 1739332065995
}
---
# 撤单 | 孙悟空
/sapi/v1/trade/cancel\_order
请求类型: POST
是否验签: 是
接口权限: 交易
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用于撤销合约订单。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
true
合约代码
order\_id
String
false
订单ID
client\_order\_id
String
false
客户订单ID
备注: order\_id和client\_order\_id必须传一个,若两个都传,以order\_id为准
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
order\_id
String
true
订单ID
client\_order\_id
String
true
客户订单ID
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan#xiang-ying-shi-li)
响应示例
[上一页批量下单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan)
[下一页批量撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan#xiang-ying-shi-li)
复制
POST https://api.sunx.io/sapi/v1/trade/cancel_order?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"contract_code": "BTC-USDT",
"order_id": 1417232260146774016
}
复制
{
"code": 200,
"data": {
"client_order_id": "1329854625038651392",
"order_id": "1329854625038651392"
},
"message": "Success",
"ts": 1737104050245
}
---
# 订阅 Market Depth 数据 | 孙悟空
market.$contract\_code.depth.$type
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: websocket:req请求,同一时刻最多请求50次;sub请求,无限制,服务器主动推送数据
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/market
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/market
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#qing-qiu-can-shu)
请求参数
字段名称
类型
说明

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#gui-ze-shuo-ming)
规则说明
订阅(sub)
取消订阅(unsub)
规则

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#ding-yue-can-shu)
订阅参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码 或 合约标识
永续:BTC-USDT(永续合约代码) ,交割:BTC-USDT-210625(交割合约代码) 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
type
string
true
Depth 类型
(150档数据) step0, step1, step2, step3, step4, step5, step14, step15, step16, step17(合并深度1-5,14-17),step0时,不合并深度;(20档数据) step6, step7, step8, step9, step10, step11, step12, step13, step18, step19(合并深度7-13,18-19);step6时,不合并深度;
备注: 合并深度仅改变显示方式,不改变实际成交价格。 step16、step17、step18、step19仅供SHIB-USDT合约使用,暂不支持其他合约使用。 step1至step5, step14至step17是进行了深度合并后的150档深度数据,step7至step13, step18, step19是进行了深度合并后的20档深度数据,对应精度如下: 档位 Depth 类型 精度 150档 step0 不合并 150档 step16 0.0000001 150档 step17 0.000001 150档 step1 0.00001 150档 step2 0.0001 150档 step3 0.001 150档 step4 0.01 150档 step5 0.1 150档 step14 1 150档 step15 10 20档 step6 不合并 20档 step18 0.0000001 20档 step19 0.000001 20档 step7 0.00001 20档 step8 0.0001 20档 step9 0.001 20档 step10 0.01 20档 step11 0.1 20档 step12 1 20档 step13 10
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#shu-ju-geng-xin)
数据更新
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.period
ts
long
true
数据进入行情服务器时间戳,单位:毫秒
false
mrid
long
true
订单ID
id
long
true
tick ID
asks
object
false
卖盘,\[price(挂单价), vol(此价格挂单张数)\], 按price升序
bids
object
false
买盘,\[price(挂单价), vol(此价格挂单张数)\], 按price降序
ts
long
true
深度生成时间戳,每100MS生成一次,单位:毫秒
version
long
true
版本号
ch
string
true
数据所属的 channel,格式: market.period
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#ding-yue-cheng-gong-shi-li)
订阅成功示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#shu-ju-geng-xin-shi-li)
数据更新示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#qu-xiao-ding-yue-shi-li)
取消订阅示例
[上一页订阅买一卖一逐笔行情推送](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-mai-yi-mai-yi-zhu-bi-hang-qing-tui-song)
[下一页订阅Market Depth增量数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju)
最后更新于1个月前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#ding-yue-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#qing-qiu-can-shu)
* [规则说明](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#gui-ze-shuo-ming)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#ding-yue-can-shu)
* [数据更新](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#shu-ju-geng-xin)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#ding-yue-cheng-gong-shi-li)
* [数据更新示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#shu-ju-geng-xin-shi-li)
* [取消订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju#qu-xiao-ding-yue-shi-li)
复制
{
"sub": "market.BTC-USDT.depth.step0",
"id": "id5"
}
复制
{
"id": "id1",
"status": "ok",
"subbed": "market.BTC-USDT.depth.step0",
"ts": 1489474081631
}
复制
{
"ch": "market.BTC-USDT.depth.step6",
"ts": 1603707576468,
"tick": {
"mrid": 131596447,
"id": 1603707576,
"bids": [\
[\
13071.9,\
38\
],\
[\
13068,\
5\
]\
],
"asks": [\
[\
13081.9,\
197\
],\
[\
13099.7,\
371\
]\
],
"ts": 1603707576467,
"version": 1603707576,
"ch": "market.BTC-USDT.depth.step6"
}
}
复制
{
"unsub": "market.BTC-USDT.depth.step0",
"id": "id5"
}
---
# 批量撤单 | 孙悟空
/sapi/v1/trade/cancel\_batch\_orders
请求类型: POST
是否验签: 是
接口权限: 交易
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制)
接口描述: 此接口用于批量撤销合约订单,最多可以撤销10个
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
true
合约代码
order\_id
Array of string
false
订单ID
client\_order\_id
Array of string
false
客户订单ID
备注: order\_id和client\_order\_id必须传一个,若两个都传,已order\_id为准。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
order\_id
Array of string
true
订单ID
client\_order\_id
Array of string
true
客户订单ID
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan#xiang-ying-shi-li)
响应示例
[上一页撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan)
[下一页全部撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan#xiang-ying-shi-li)
复制
POST https://api.sunx.io/sapi/v1/trade/cancel_batch_orders?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"contract_code": "BTC-USDT",
"order_id": [\
"1417232562245373953",\
"1417232562245373952"\
]
}
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417232562245373953",\
"client_order_id": "1417232562245373953"\
},\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417232562245373952",\
"client_order_id": "1417232562245373952"\
}\
],
"ts": 1757936173760
}
---
# 用户持仓量限制的查询 | 孙悟空
/sapi/v1/position/position\_limit
请求类型: POST
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 该接口仅支持全仓模式。 请求参数contract\_code支持交割合约代码,格式为BTC-USDT。 pair、contract\_type和contract\_code。 business\_type 在查询交割合约数据时为必填参数。且参数值要传:futures 或 all 。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
false
合约代码
永续:"BTC-USDT"... ,交割:”BTC-USDT-210625“
pair
string
false
交易对
BTC-USDT
contract\_type
string
false
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
status
string
true
请求处理结果
ok , "error"
ts
long
true
响应生成时间点,单位:毫秒
object array
true
symbol
string
true
品种代码
BTC,"ETH"...
contract\_code
string
true
合约代码
永续:"BTC-USDT"... ,交割:”BTC-USDT-210625“
margin\_mode
string
true
保证金模式
cross:全仓模式;
buy\_limit
decimal
true
合约多仓持仓的最大值,单位为张
sell\_limit
decimal
true
合约空仓持仓的最大值,单位为张
contract\_type
string
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
pair
string
true
交易对
如:“BTC-USDT”
business\_type
string
true
业务类型
futures:交割、swap:永续
lever\_rate
int
true
用户当前品种杠杆倍数
buy\_limit\_value
decimal
true
合约多仓持仓价值上限,单位USDT
sell\_limit\_value
decimal
true
合约空仓持仓价值上限,单位USDT
mark\_price
decimal
true
当前品种标记价格(以该价格用于计算持仓张数)
trade\_partition
string
true
参数已废弃
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun#xiang-ying-shi-li)
响应示例
[上一页查询持仓风险限额](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-chi-cang-feng-xian-xian-e)
[下一页行情数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/yong-hu-chi-cang-liang-xian-zhi-de-cha-xun#xiang-ying-shi-li)
复制
GET https://api.sunx.io/sapi/v1/position/position_limit?contract_code=BTC-USDT&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
复制
{
"status": "ok",
"data": [\
{\
"symbol": "BTC",\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"buy_limit": 26126,\
"sell_limit": 26126,\
"business_type": "swap",\
"contract_type": "swap",\
"pair": "BTC-USDT",\
"lever_rate": 5,\
"buy_limit_value": 3000000.000000000000000000,\
"sell_limit_value": 3000000.000000000000000000,\
"mark_price": 114826.3,\
"trade_partition": "USDT"\
}\
],
"ts": 1757939712955
}
---
# 订阅成交变动数据 | 孙悟空
trade.$contract\_code
是否验签: 是
接口权限: 读取
限频: WebSocket私有订单成交推送接口(需要API KEY验签) 一个UID最多同时建立30个私有订单成交推送WS链接。该用户在一个品种(包含该品种的所有周期的合约)上,仅需要维持一个订单推送WS链接即可。 单个链接为50次/秒的请求,单个IP链接为100次/秒的请求。 注意: 订单推送WS的限频,跟用户RESTFUL私有接口的限频是分开的,相互不影响。
接口描述: 发生成交事件时,推送如下消息。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/notification
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/notification
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#qing-qiu-can-shu)
请求参数
字段名称
类型
说明
op
string
必填;操作名称,sub 或 unsub;
cid
string
选填;Client 请求唯一 ID
topic
string
必填; trade
contract\_code
string
必填; contract\_code \* 或者 BTC-USDT 或者 BTC-USDT-240909
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#gui-ze-shuo-ming)
规则说明
订阅(sub)
取消订阅(unsub)
规则
\*
\*
yes
\*
contract\_code
no
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#ding-yue-can-shu)
订阅参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码,支持大小写
全部:\*(交割和永续), 永续:“BTC-USDT:... ,交割:"BTC-USDT-210625"...
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#shu-ju-geng-xin)
数据更新
参数
数据类型
是否必填
描述
取值范围
op
String
true
操作名称,推送固定值为 notify;--可不可以去掉
topic
String
true
推送的主题
trade
ts
long
true
服务端应答时间戳
uid
String
true
用户uid
false
contract\_code
String
true
交易对。常用形式为“基础货币”+“报价货币”
order\_id
String
true
订单ID
client\_order\_id
String
true
用户自定义订单ID
id
String
true
成交id
direction
String
true
交易方向
buy表示买,sell表示卖。
position\_side
String
true
仓位方向
"long":多,"short":空,“both”:单向持仓。
role
String
true
成交角色maker, taker
trade\_price
String
true
成交价格
trade\_volume
String
true
成交量(张)
trade\_turnover
String
true
成交金额(成交数量 \* 合约面值 \* 成交价格)
created\_time
String
true
创建时间
updated\_time
String
true
更新时间,默认为撮合成交时间
contract\_type
String
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#ding-yue-cheng-gong-shi-li)
订阅成功示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#shu-ju-geng-xin-shi-li)
数据更新示例
[上一页订阅撮合后的订单数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju)
[下一页订阅订单数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju)
最后更新于1个月前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#ding-yue-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#qing-qiu-can-shu)
* [规则说明](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#gui-ze-shuo-ming)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#ding-yue-can-shu)
* [数据更新](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#shu-ju-geng-xin)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#ding-yue-cheng-gong-shi-li)
* [数据更新示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju#shu-ju-geng-xin-shi-li)
复制
{
"op": "sub",
"cid": "ovILlciUtO",
"topic": "trade",
"contract_code": "*"
}
复制
{
"op": "auth",
"type": "api",
"err-code": 0,
"ts": 1734575734395,
"data": {
"user-id": "41312018"
}
}
复制
{
"op":"notify"
"topic":"trade"
"contract_code":"SHIB-USDT"
"ts":1749468764319
"uid":"502061937"
"data":[\
0:{\
"direction":"sell"\
"position_side":"short"\
"id":"100005308993680-1381717672952373248-1"\
"contract_code":"SHIB-USDT"\
"contract_type":"swap"\
"order_id":1381717672952373200\
"trade_id":100005308993680\
"trade_volume":"1"\
"trade_price":"0.000012686"\
"trade_turnover":"0.012686"\
"role":"taker"\
"client_order_id":"111111222267"\
"created_time":1749468764304\
"updated_time":1749468764315\
}\
]
}
---
# 市价全平 | 孙悟空
/sapi/v1/trade/position
请求类型: POST
是否验签: 是
接口权限: 交易
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用于市价卖出指定的持仓
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
true
合约代码
margin\_mode
String
true
保证金模式
cross:全仓 ;
position\_side
String
true
仓位方向
持仓方向 买卖模式下默认值both, 开平仓模式下: long:多 ,short:空
client\_order\_id
String
false
用户自定义订单ID
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
order\_id
String
true
订单ID\[全局唯一\]
client\_order\_id
String
false
用户自己的订单id
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping#xiang-ying-shi-li)
响应示例
[上一页全部撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan)
[下一页一键全平](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping#xiang-ying-shi-li)
复制
POST https://api.sunx.io/v5/trade/position?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"contract_code": "BTC-USDT",
"margin_mode": "cross",
"position_side": "long",
"client_order_id": "1330969352647610368"
}
复制
{
"contract_code": "BTC-USDT",
"margin_mode": "cross",
"position_side": "both"
}
---
# 全部撤单 | 孙悟空
/sapi/v1/trade/cancel\_all\_orders
请求类型: POST
是否验签: 是
接口权限: 交易
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制)
接口描述: 撤销当前全部的挂单(不含策略单)。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
线上环境
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
false
合约代码
side
String
false
订单方向
buy:买 "sell":卖
position\_side
String
false
仓位方向
"long":多 "short":空 “both”:单向持仓
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
order\_id
string
true
订单ID
client\_order\_id
string
true
客户订单ID
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan#xiang-ying-shi-li)
响应示例
[上一页批量撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-che-dan)
[下一页市价全平](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/shi-jia-quan-ping)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/quan-bu-che-dan#xiang-ying-shi-li)
复制
POST https://api.sunx.io/sapi/v1/trade/cancel_all_orders?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"contract_code": "BTC-USDT",
"side": "buy",
"position_side": "long"
}
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417232562245373953",\
"client_order_id": "1417232562245373953"\
},\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417544780581212160",\
"client_order_id": "1417544780581212160"\
}\
],
"ts": 1758014173830
}
---
# Ws 合约批量下单 | 孙悟空
####
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#place_batch_orders)
place\_batch\_orders
是否验签: 是
接口权限: 交易
限频: 共享REST限频次数。
接口描述: 该接口仅支持websocket合约批量下单。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/trade
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/trade
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#ding-yue-can-shu)
订阅参数
字段名称
类型
说明
op
string
必填;操作名称为 place\_batch\_orders;
cid
string
选填; 请求唯一 ID
data
array
批量下单的参数
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
true
订单参数
contract\_code
String
true
合约代码
margin\_mode
String
true
保证金模式 cross:全仓 ;
position\_side
String
false
仓位方向
"long":多 "short":空 “both”:单向持仓,开平模式必填,买卖模式默认为both。
side
String
true
订单方向
buy:买 "sell":卖
type
String
true
订单类型;枚举
"market": 市价,"limit":限价, "post\_only":只做maker
price\_match
String
false
最优档位,和price互斥
opponent-对手价、"optimal\_5":最优5档,"optimal\_10":最优10档,"optimal\_20":最优20档
time\_in\_force
String
false
枚举fok, ioc, gtc,非必填,默认是gtc
client\_order\_id
String
false
用户自定义订单ID
\[1-9223372036854775807\]
price
String
false
价格,仅当限价单的时候有效,市价无需输入。
volume
String
true
委托张数。
reduce\_only
Integer
false
只减仓 0-否,1-是
tp\_trigger\_price
String
false
止盈触发价格
tp\_order\_price
String
false
止盈委托价格(最优N档委托类型时无需填写价格)
tp\_type
String
false
止盈委托类型,不填默认为market;市价:market,限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
tp\_trigger\_price\_type
String
false
止盈价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
sl\_trigger\_price
String
false
止损触发价格
sl\_order\_price
String
false
止损委托价格(最优N档委托类型时无需填写价格)
sl\_type
String
false
止损委托类型,不填默认为market; 市价:market,限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
sl\_trigger\_price\_type
String
false
止损价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
price\_protect
boolean
false
价差保护,默认为false。仅当设置止盈/止损需要该参数。
false 或者 true
self\_match\_prevent
String
false
防自成交
cancel\_taker :撤销taker单 cancel\_maker:撤销maker单 cancel\_both:撤销全部订单
默认为 cancel\_taker
false
cid
string
false
表示本次请求id
备注: 备注: position\_side持仓方向 单向持仓模式下此参数非必填 如果填写仅可以选择both;在双向持仓模式下必填,且仅可选择 long 或 short。 双向持仓模式下,side和position\_side需要进行组合 买入开多(side 填写 buy; position\_side 填写 long ) 卖出开空(side 填写 sell; position\_side 填写 short ) 卖出平多(side 填写 sell;position\_side 填写 long ) 买入平空(side 填写 buy; position\_side 填写 short ) 单向持仓模式下,多仓返回buy,空仓返回sell
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#fan-hui-can-shu)
返回参数
参数
数据类型
是否必填
描述
取值范围
code
int
true
响应编码
200:成功、非200:失败
message
String
true
响应描述
object
true
code
int
true
下单响应编码
200:成功、非200:失败
message
String
true
下单响应描述
order\_id
String
true
订单ID
client\_order\_id
String
false
用户下单时填写的客户端订单ID,没填则不返回
false
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#ding-yue-cheng-gong-shi-li)
订阅成功示例
[上一页Websocket交易](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi)
[下一页Ws 合约批量撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-che-dan)
最后更新于19天前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#ding-yue-di-zhi)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#ding-yue-can-shu)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#qing-qiu-can-shu)
* [返回参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#fan-hui-can-shu)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi/ws-he-yue-pi-liang-xia-dan#ding-yue-cheng-gong-shi-li)
复制
{
"op": "place_batch_orders",
"cid": "place_batch_orders_1234",
"data": [\
{\
"time_in_force": "gtc",\
"price_protect": "true",\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"position_side": "long",\
"price": 5000,\
"volume": 1,\
"side": "buy",\
"lever_rate": 5,\
"type": "limit"\
},\
{\
"time_in_force": "gtc",\
"price_protect": "true",\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"position_side": "long",\
"price": 5000,\
"volume": 1,\
"side": "buy",\
"lever_rate": 5,\
"type": "limit"\
}\
]
}
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"orderId": "1358936204495511552",\
"clientOrderId": "1358936204495511552",\
"code": 200,\
"message": "Success"\
},\
{\
"orderId": "1358936204537454592",\
"clientOrderId": "1358936204537454592",\
"code": 200,\
"message": "Success"\
}\
],
"ts": 1744037238982,
"cid": "place_batch_orders_1234"
}
---
# 查询杠杆等级列表 | 孙悟空
/sapi/v1/position/lever
请求类型: GET
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用户查询出杠杆等级的列表
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
false
合约代码
"BTC-USDT","ETH-USDT"……
margin\_mode
String
false
保证金模式
cross:全仓
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
contract\_code
String
true
合约代码
"BTC-USDT","ETH-USDT"……
contract\_type
String
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
margin\_mode
String
true
保证金模式
cross:全仓
lever\_rate
Long
true
杠杆等级
available\_lever
List
true
可用杠杆等级
可用杠杆倍数
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao#xiang-ying-shi-li)
响应示例
[上一页查询当前持仓](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang)
[下一页设置杠杆等级](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/she-zhi-gang-gan-deng-ji)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao#xiang-ying-shi-li)
复制
GET https://api.sunx.io/sapi/v1/position/lever?contract_code=BTC-USDT&margin_mode=cross&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"lever_rate": 5,\
"contract_type": "swap",\
"available_lever": [\
3,\
4,\
5,\
6,\
7,\
8,\
9,\
10,\
11,\
12,\
13,\
14,\
15,\
16,\
17,\
18,\
19,\
20,\
21,\
22,\
23,\
24,\
25,\
26,\
27,\
28,\
29,\
30,\
31,\
32,\
33,\
34,\
35,\
36,\
37,\
38,\
39,\
40,\
41,\
42,\
43,\
44,\
45,\
46,\
47,\
48,\
49,\
50,\
51,\
52,\
53,\
54,\
55,\
56,\
57,\
58,\
59,\
60,\
61,\
62,\
63,\
64,\
65,\
66,\
67,\
68,\
69,\
70,\
71,\
72,\
73,\
74,\
75,\
76,\
77,\
78,\
79,\
80,\
81,\
82,\
83,\
84,\
85,\
86,\
87,\
88,\
89,\
90,\
91,\
92,\
93,\
94,\
95,\
96,\
97,\
98,\
99,\
100,\
101,\
102,\
103,\
104,\
105,\
106,\
107,\
108,\
109,\
110,\
111,\
112,\
113,\
114,\
115,\
116,\
117,\
118,\
119,\
120,\
121,\
122,\
123,\
124,\
125,\
126,\
127,\
128,\
129,\
130,\
131,\
132,\
133,\
134,\
135,\
136,\
137,\
138,\
139,\
140,\
141,\
142,\
143,\
144,\
145,\
146,\
147,\
148,\
149,\
150,\
151,\
152,\
153,\
154,\
155,\
156,\
157,\
158,\
159,\
160,\
161,\
162,\
163,\
164,\
165,\
166,\
167,\
168,\
169,\
170,\
171,\
172,\
173,\
174,\
175,\
176,\
177,\
178,\
179,\
180,\
181,\
182,\
183,\
184,\
185,\
186,\
187,\
188,\
189,\
190,\
191,\
192,\
193,\
194,\
195,\
196\
]\
}\
],
"ts": 1740452428851
}
---
# 查询当前持仓 | 孙悟空
/sapi/v1/trade/position/opens
请求类型: GET
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用于查询当前用户持仓仓位的信息。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
false
合约代码
永续:"BTC-USDT"... , 交割:“BTC-USDT-210625” ...
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
contract\_code
String
true
合约代码
position\_side
String
true
仓位方向
持仓方向 买卖模式下默认值both, 开平仓模式下: long:平多
direction
String
true
订单方向
"buy":买, "sell":卖
margin\_mode
String
true
保证金模式
cross:全仓
open\_avg\_price
String
true
开仓均价
volume
String
true
持仓量(张
available
String
true
可平仓数量(张)
lever\_rate
Long
true
杠杠倍数
adl\_risk\_percent
String
true
自动减仓指示
(1、2、3、4、5),1档风险最低,5档风险最高
liquidation\_price
String
true
预估强平价
initial\_margin
String
true
初始保证金,仅适用于全仓
maintenance\_margin
String
true
维持保证金
profit\_unreal
String
true
未实现盈亏
profit\_rate
String
true
未实现收益率
margin\_rate
String
true
保证金率-对标调整信息
margin\_currency
String
true
保证金币种(计价币种)
last\_price
String
true
最新价格
mark\_price
decimal
true
标记价格
contract\_type
String
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
created\_time
String
true
创建时间
updated\_time
String
true
更新时间
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang#xiang-ying-shi-li)
响应示例
[上一页持仓类](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei)
[下一页查询杠杆等级列表](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-gang-gan-deng-ji-lie-biao)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei/cha-xun-dang-qian-chi-cang#xiang-ying-shi-li)
复制
GET https://api.sunx.io/sapi/v1/trade/position/opens?contract_code=BTC-USDT&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"contract_code": "BTC-USDT",\
"position_side": "both",\
"direction": "buy",\
"margin_mode": "cross",\
"open_avg_price": "1672.36",\
"volume": "10",\
"available": "10",\
"lever_rate": 5,\
"adl_risk_percent": null,\
"liquidation_price": "-6615323.17169213120630934",\
"initial_margin": "23.9516",\
"maintenance_margin": "0.4490925",\
"profit_unreal": "-47.478",\
"profit_rate": "-1.9822",\
"margin_rate": "0.000000681298594547",\
"mark_price": "1197.58",\
"margin_currency": "USDT",\
"contract_type": "swap",\
"created_time": 1740451087505,\
"updated_time": 1740451087505\
}\
],
"ts": 1740451897695
}
---
# 订阅Market Depth增量数据 | 孙悟空
market.$contract\_code.depth.size\_${size}.high\_freq
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: websocket:req请求,同一时刻最多请求50次;sub请求,无限制,服务器主动推送数据
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/market
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/market
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#qing-qiu-can-shu)
请求参数
字段名称
类型
说明

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#gui-ze-shuo-ming)
规则说明
订阅(sub)
取消订阅(unsub)
规则

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#ding-yue-can-shu)
订阅参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码 或 合约标识
永续:BTC-USDT(永续合约代码) ,交割:BTC-USDT-210625(交割合约代码) 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
size
string
true
档位数
20:表示20档不合并的深度,150:表示150档不合并的深度
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#shu-ju-geng-xin)
数据更新
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.$contract\_code.depth.size\_${size}.high\_freq
ts
long
true
进入行情服务器系统时间点,单位:毫秒
false
mrid
long
true
订单ID
id
long
true
tick ID
asks
object
true
卖盘,\[price(挂单价), vol(此价格挂单张数)\], 按price升序
bids
object
true
买盘,\[price(挂单价), vol(此价格挂单张数)\], 按price降序
ts
long
true
系统检测orderbook时间点,单位:毫秒
version
long
true
版本号
ch
string
true
数据所属的 channel,格式: market.$symbol.depth.size\_${size}.high\_freq
event
string
true
事件类型;"update":更新,表示推送买卖各20档或150档不合并深度的增量数据;"snapshot":快照值,表示推送买卖各20档或150档不合并深度的全量数据
false
备注: 1、当"data\_type"为incremental时,首次推送的"event"为"snapshot"的数据,且当重新发送订阅请求时,首次返回都是"snapshot"的数据; 2、深度即可以按照合约周期订阅,也可以按照合约代码订阅,行情系统在进行数据计算时,需要更新对应类型的数据; 3、version(版本号),是自增的序号,每次增加1,不管是增量还是全量数据,每个连接是唯一的。多个websocket连接的version是可能不同的。 4、每30ms检查一次orderbook,如果有更新,则推送,如果没有更新,则不推送。 5、如果是增量数据,要自己维护好本地的orderbook bidsasks 数据。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#ding-yue-cheng-gong-shi-li)
订阅成功示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#shu-ju-geng-xin-shi-li)
数据更新示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#qu-xiao-ding-yue-shi-li)
取消订阅示例
[上一页订阅 Market Depth 数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-shu-ju)
[下一页订阅 KLine 数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju)
最后更新于1个月前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#ding-yue-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#qing-qiu-can-shu)
* [规则说明](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#gui-ze-shuo-ming)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#ding-yue-can-shu)
* [数据更新](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#shu-ju-geng-xin)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#ding-yue-cheng-gong-shi-li)
* [数据更新示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#shu-ju-geng-xin-shi-li)
* [取消订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju#qu-xiao-ding-yue-shi-li)
复制
{
"sub": "market.BTC-USDT.depth.size_20.high_freq",
"data_type": "incremental",
"id": "id generated by client"
}
复制
{
"status": "ok",
"subbed": "market.BTC-USDT.depth.size_20.high_freq",
"data_type": "incremental",
"id": "id generated by client",
"ts": 1489474081631
}
复制
{
"ch": "market.BTC-USDT.depth.size_20.high_freq",
"tick": {
"asks": [\
[\
13081.9,\
206\
],\
[\
13099.7,\
371\
]\
],
"bids": [\
[\
13071.9,\
38\
],\
[\
13060,\
400\
]\
],
"ch": "market.BTC-USDT.depth.size_20.high_freq",
"event": "snapshot",
"id": 131597620,
"mrid": 131597620,
"ts": 1603707712356,
"version": 1512467
},
"ts": 1603707712357
}
复制
{
"unsub": "market.BTC-USDT.depth.size_20.high_freq",
"data_type": "incremental",
"id": "id generated by client"
}
---
# 订阅(sub)指数K线数据 | 孙悟空
market.$contract\_code.index.$period
是否验签: 是
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: websocket:req请求,同一时刻最多请求50次;sub请求,无限制,服务器主动推送数据
接口描述: 该接口支持全仓模式和逐仓模式
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/market
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/market
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#qing-qiu-can-shu)
请求参数
字段名称
类型
说明

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#gui-ze-shuo-ming)
规则说明
订阅(sub)
取消订阅(unsub)
规则

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#ding-yue-can-shu)
订阅参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
指数标识
支持大小写,"BTC-USDT","ETH-USDT"...
period
string
true
K线类型
仅支持小写,1min, 5min, 15min, 30min, 60min,4hour,1day, 1mon
备注: 当指数有变化时会推送; 指数无变化时会根据订阅的周期推送;
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#shu-ju-geng-xin)
数据更新
参数
数据类型
是否必填
描述
取值范围
ch
string
false
数据所属的 channel,格式: market.$contract\_code.index.$period
ts
long
false
响应生成时间点,单位:毫秒
object array
false
id
string
false
指数K线id,也就是K线时间戳,K线起始时间
vol
string
false
成交量张数为0
count
decimal
false
成交笔数为0
open
string
false
开盘指数价
close
string
false
收盘指数价
low
string
false
最低指数价
high
string
false
最高指数价
amount
string
false
数值为0
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#ding-yue-cheng-gong-shi-li)
订阅成功示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#shu-ju-geng-xin-shi-li)
数据更新示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#qu-xiao-ding-yue-shi-li)
取消订阅示例
[上一页订阅 Trade Detail 数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju)
[下一页Websocket交易](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-jiao-yi)
最后更新于1个月前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#ding-yue-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#qing-qiu-can-shu)
* [规则说明](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#gui-ze-shuo-ming)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#ding-yue-can-shu)
* [数据更新](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#shu-ju-geng-xin)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#ding-yue-cheng-gong-shi-li)
* [数据更新示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#shu-ju-geng-xin-shi-li)
* [取消订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju#qu-xiao-ding-yue-shi-li)
复制
{
"sub": "market.BTC-USDT.index.1min",
"id": "id1"
}
复制
{
"id": "id1",
"status": "ok",
"subbed": "market.BTC-USDT.index.1min",
"ts": 1489474081631
}
复制
{
"ch": "market.BTC-USDT.index.15min",
"ts": 1607309592214,
"tick": {
"id": 1607309100,
"open": "19213.505",
"close": "19242.05",
"high": "19248.31",
"low": "19213.505",
"amount": "0",
"vol": "0",
"count": 0
}
}
复制
{
"unsub": "market.BTC-USDT.index.1min",
"id": "id1"
}
---
# 订阅 KLine 数据 | 孙悟空
market.$contract\_code.kline.$period
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: websocket:req请求,同一时刻最多请求50次;sub请求,无限制,服务器主动推送数据
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/market
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/market
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#qing-qiu-can-shu)
请求参数
字段名称
类型
说明

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#gui-ze-shuo-ming)
规则说明
订阅(sub)
取消订阅(unsub)
规则

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#ding-yue-can-shu)
订阅参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码 或 合约标识
永续:BTC-USDT(永续合约代码) ,交割:BTC-USDT-210625(交割合约代码) 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
period
string
true
K线周期
仅支持小写:1min, 5min, 15min, 30min, 1hour,4hour,1day, 1mon
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#shu-ju-geng-xin)
数据更新
参数
数据类型
是否必填
描述
取值范围
ch
string
true
请求参数
ts
long
true
响应生成时间点,单位:毫秒
false
id
long
true
K线ID,也就是K线时间戳,K线起始时间
mrid
long
true
订单ID
vol
decimal
true
成交量张数。 值是买卖双边之和
count
decimal
true
成交笔数。 值是买卖双边之和
open
decimal
true
开盘价
close
decimal
true
收盘价,当K线为最晚的一根时,是最新成交价
low
decimal
true
最低价
high
decimal
true
最高价
amount
decimal
true
成交量(币), 即 sum(每一笔成交量(张) \* 单张合约面值/该笔成交价)。 值是买卖双边之和
trade\_turnover
decimal
true
成交额, 即sum(每一笔成交张数 \* 合约面值 \* 成交价格)。 值是买卖双边之和
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#ding-yue-cheng-gong-shi-li)
订阅成功示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#shu-ju-geng-xin-shi-li)
数据更新示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#qu-xiao-ding-yue-shi-li)
取消订阅示例
[上一页订阅Market Depth增量数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-market-depth-zeng-liang-shu-ju)
[下一页订阅 Trade Detail 数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju)
最后更新于1个月前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#ding-yue-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#qing-qiu-can-shu)
* [规则说明](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#gui-ze-shuo-ming)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#ding-yue-can-shu)
* [数据更新](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#shu-ju-geng-xin)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#ding-yue-cheng-gong-shi-li)
* [数据更新示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#shu-ju-geng-xin-shi-li)
* [取消订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju#qu-xiao-ding-yue-shi-li)
复制
{
"sub": "market.BTC-USDT.kline.1min",
"id": "id1"
}
复制
{
"id": "id1",
"status": "ok",
"subbed": "market.BTC-USDT.kline.1min",
"ts": 1489474081631
}
复制
{
"ch": "market.BTC-USDT.kline.1min",
"ts": 1603707124366,
"tick": {
"id": 1603707120,
"mrid": 131592424,
"open": 13067.7,
"close": 13067.7,
"high": 13067.7,
"low": 13067.7,
"amount": 0.004,
"vol": 4,
"trade_turnover": 52.2708,
"count": 1
}
}
复制
{
"unsub": "market.BTC-USDT.kline.1min",
"id": "id1"
}
---
# 订阅 Trade Detail 数据 | 孙悟空
market.$contract\_code.trade.detail
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: websocket:req请求,同一时刻最多请求50次;sub请求,无限制,服务器主动推送数据
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/market
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/market
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#qing-qiu-can-shu)
请求参数
字段名称
类型
说明

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#gui-ze-shuo-ming)
规则说明
订阅(sub)
取消订阅(unsub)
规则

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#ding-yue-can-shu)
订阅参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码 或 合约标识
永续:BTC-USDT(永续合约代码) ,交割:BTC-USDT-210625(交割合约代码) 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#shu-ju-geng-xin)
数据更新
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.$contract\_code.trade.detail
ts
long
true
发送时间
false
id
long
true
订单唯一id(品种唯一)
ts
long
true
tick数据戳
false
amount
decimal
true
数量(张)。 值是买卖双边之和
ts
long
true
订单时间戳
id
long
true
成交唯一id(品种唯一)
price
decimal
true
价格
direction
string
true
买卖方向,即taker(主动成交)的方向
quantity
decimal
true
成交量(币)
trade\_turnover
decimal
true
成交额(计价币种)
false
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#ding-yue-cheng-gong-shi-li)
订阅成功示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#shu-ju-geng-xin-shi-li)
数据更新示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#qu-xiao-ding-yue-shi-li)
取消订阅示例
[上一页订阅 KLine 数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-kline-shu-ju)
[下一页订阅(sub)指数K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-sub-zhi-shukxian-shu-ju)
最后更新于1个月前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#ding-yue-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#qing-qiu-can-shu)
* [规则说明](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#gui-ze-shuo-ming)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#ding-yue-can-shu)
* [数据更新](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#shu-ju-geng-xin)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#ding-yue-cheng-gong-shi-li)
* [数据更新示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#shu-ju-geng-xin-shi-li)
* [取消订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao/ding-yue-trade-detail-shu-ju#qu-xiao-ding-yue-shi-li)
复制
{
"sub": "market.BTC-USDT.trade.detail",
"id": "id7"
}
复制
{
"id": "id7",
"status": "ok",
"subbed": "market.BTC-USDT.trade.detail",
"ts": 1489474081631
}
复制
{
"ch": "market.BTC-USDT.trade.detail",
"ts": 1603708208346,
"tick": {
"id": 131602265,
"ts": 1603708208335,
"data": [\
{\
"amount": 2,\
"ts": 1603708208335,\
"id": 1316022650000,\
"price": 13073.3,\
"direction": "buy",\
"quantity": 0.002,\
"trade_turnover": 26.334\
}\
]
}
}
复制
{
"unsub": "market.BTC-USDT.trade.detail",
"id": "id7"
}
---
# 订阅撮合后的订单数据 | 孙悟空
match\_orders.$contract\_code
是否验签: 是
接口权限: 读取
限频: WebSocket私有订单成交推送接口(需要API KEY验签) 一个UID最多同时建立30个私有订单成交推送WS链接。该用户在一个品种(包含该品种的所有周期的合约)上,仅需要维持一个订单推送WS链接即可。 单个链接为50次/秒的请求,单个IP链接为100次/秒的请求。 注意: 订单推送WS的限频,跟用户RESTFUL私有接口的限频是分开的,相互不影响。
接口描述: 当订单发生下单、订单撤单、成交等事件时,从撮合里引擎面推送消息
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/notification
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/notification
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#qing-qiu-can-shu)
请求参数
字段名称
类型
说明
op
string
必填;操作名称,sub 或 unsub;
cid
string
选填;Client 请求唯一 ID
topic
string
必填; match\_orders
contract\_code
string
必填; contract\_code \* 或者 BTC-USDT 或者 BTC-USDT-240909
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#gui-ze-shuo-ming)
规则说明
订阅(sub)
取消订阅(unsub)
规则
\*
\*
允许
\*
contract\_code
不允许
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#ding-yue-can-shu)
订阅参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码,支持大小写
全部:\*(交割和永续), 永续:“BTC-USDT:... ,交割:"BTC-USDT-210625"...
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#shu-ju-geng-xin)
数据更新
参数
数据类型
是否必填
描述
取值范围
op
String
true
操作名称,推送固定值为 notify;--可不可以去掉
topic
String
true
推送的主题
orders
ts
long
true
服务端应答时间戳
uid
String
true
用户uid
false
contract\_code
String
true
合约代码
永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
side
String
true
买卖方向
buy:买 "sell":卖
position\_side
String
true
仓位方向
"long":多 "short":空 “both”:单向持仓
type
String
true
订单类型;枚举
"market": 市价,"limit":限价, "post\_only":只挂单
price\_match
String
true
价格匹配
行情当前没有
order\_id
String
true
订单id
client\_order\_id
String
true
用户自定义订单ID
trade\_id
String
true
成交id
margin\_mode
String
true
保证金模式
枚举 cross
price
String
true
委托价格
volume
String
true
委托数量
lever\_rate
String
true
废弃参数
state
int
true
订单状态
new, partially\_filled, partially\_canceled, filled ,canceled,
order\_source
String
true
订单来源
(system:系统、web:用户网页、api:用户API、m:用户M站、risk:风控系统、settlement:交割结算、ios:ios客户端、android:安卓客户端、windows:windows客户端、mac:mac客户端、trigger:计划委托触发、tpsl:止盈止损触发、ADL: adl订单)
time\_in\_force
String
true
枚举fok, ioc, gtc,非必填,默认是gtc
reduce\_only
Boolean
true
只减仓
trade\_price
String
true
成交均价
trade\_volume
String
true
成交数量
total\_trade\_volume
String
true
累计成交数量
cancel\_reason
String
false
撤单原因
"Limit order cancelation by the client":"用户主动撤销普通限价订单","Order cancelation by system":"系统撤单","Market order circuit-breaker":"市价单熔断","Bankruptcy price of market order":"市价单破产价","Order cancelation due to no matching orders":"没有对手盘导致撤单"," Self trading prevention":"防自成交撤单","Number of maker orders matched with your taker orders exceeding limit":"成交笔数超过最大限制","Order cancelation due to API timeout":"API超时撤单"
created\_time
String
true
订单创建时间, UTC时间戳(MS)
match\_time
String
true
撮合更新时间, UTC时间戳(MS)
撮合时间
self\_match\_prevent
String
true
防自成交
cancel\_taker: 撤销taker单 cancel\_maker:撤销maker单 cancel\_both:撤销全部订单
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#ding-yue-cheng-gong-shi-li)
订阅成功示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#shu-ju-geng-xin-shi-li)
数据更新示例
[上一页订阅持仓变动数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju)
[下一页订阅成交变动数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju)
最后更新于1个月前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#ding-yue-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#qing-qiu-can-shu)
* [规则说明](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#gui-ze-shuo-ming)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#ding-yue-can-shu)
* [数据更新](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#shu-ju-geng-xin)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#ding-yue-cheng-gong-shi-li)
* [数据更新示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju#shu-ju-geng-xin-shi-li)
复制
{
"op": "sub",
"cid": "zTX5sUJscf",
"topic": "match_orders",
"contract_code": "EOS-USDT"
}
复制
{
"op": "auth",
"type": "api",
"err-code": 0,
"ts": 1734516850688,
"data": {
"user-id": "41312018"
}
}
复制
{
"op": "notify",
"topic": "match_orders",
"contract_code": "BTC-USDT",
"ts": 1755076981482,
"uid": "121993903",
"data": [\
{\
"side": "buy",\
"type": "limit",\
"price": "3100",\
"volume": "3",\
"state": "filled",\
"id": "100000034600800-1405240240295698432-1",\
"contract_code": "BTC-USDT",\
"contract_type": "swap",\
"order_id": "1405240240295698432",\
"position_side": "long",\
"price_match": null,\
"client_order_id": "1405240240295698432",\
"margin_mode": "cross",\
"lever_rate": "",\
"order_source": "web",\
"reduce_only": false,\
"time_in_force": "gtc",\
"cancel_reason": null,\
"trade_id": "4467",\
"trade_volume": "3",\
"total_trade_volume": "3",\
"trade_price": "3100",\
"trade_turnover": "9.3",\
"role": "taker",\
"created_time": "1755076981387",\
"match_time": "1755076981448",\
"self_match_prevent":"cancel_taker"\
}\
]
}
---
# 下单 | 孙悟空
/sapi/v1/trade/order
请求类型: POST
是否验签: 是
接口权限: 交易
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用户合约下单交易。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
true
合约代码
margin\_mode
String
true
保证金模式 cross:全仓 ;
position\_side
String
false
仓位方向
"long":多 "short":空 “both”:单向持仓,开平模式必填,买卖模式默认为both。
side
String
true
订单方向
buy:买 "sell":卖
type
String
true
订单类型;枚举
"market": 市价,"limit":限价, "post\_only":只做maker
price\_match
String
false
最优档位,和price互斥
opponent-对手价、opponent-对手价、"optimal\_5":最优5档,"optimal\_10":最优10档,"optimal\_20":最优20档
client\_order\_id
String
false
用户自定义订单ID
\[1-9223372036854775807\]
price
String
false
价格,仅当限价单的时候有效,市价无需输入。
volume
String
true
委托张数。
reduce\_only
Integer
false
只减仓 0-否,1-是
time\_in\_force
String
false
枚举fok, ioc, gtc,非必填,默认是gtc
tp\_trigger\_price
String
false
止盈触发价格
tp\_order\_price
String
false
止盈委托价格(最优N档委托类型时无需填写价格)
tp\_type
String
false
止盈委托类型,不填默认为market;市价:market,限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
tp\_trigger\_price\_type
String
false
止盈价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
sl\_trigger\_price
String
false
止损触发价格
sl\_order\_price
String
false
止损委托价格(最优N档委托类型时无需填写价格)
sl\_type
String
false
止损委托类型,不填默认为market; 市价:market,限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
sl\_trigger\_price\_type
String
false
止损价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
price\_protect
boolean
false
价差保护,默认为false。仅当设置止盈/止损需要该参数。
false 或者 true
self\_match\_prevent
String
false
防自成交
cancel\_taker: 撤销taker单 cancel\_maker:撤销maker单 cancel\_both:撤销全部订单
cancel\_taker
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
order\_id
String
true
订单ID
client\_order\_id
String
false
用户下单时填写的客户端订单ID,没填则不返回
备注: 备注: position\_side持仓方向 单向持仓模式下此参数非必填 如果填写仅可以选择both;在双向持仓模式下必填,且仅可选择 long 或 short。 双向持仓模式下,side和position\_side需要进行组合 买入开多(side 填写 buy; position\_side 填写 long ) 卖出开空(side 填写 sell; position\_side 填写 short ) 卖出平多(side 填写 sell;position\_side 填写 long ) 买入平空(side 填写 buy; position\_side 填写 short ) 单向持仓模式下,多仓返回buy,空仓返回sell
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan#xiang-ying-shi-li)
响应示例
[上一页订单类](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei)
[下一页批量下单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan#xiang-ying-shi-li)
复制
POST https://api.sunx.io/sapi/v1/trade/order?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"time_in_force": "gtc",
"price_protect": "true",
"contract_code": "BTC-USDT",
"margin_mode": "cross",
"position_side": "both",
"price": 0.015,
"volume": 2,
"side": "buy",
"type": "limit"
}
复制
{
"code": 200,
"data": {
"client_order_id": "1329503956647878656",
"order_id": "1329503956647878656"
},
"message": "Success",
"ts": 1737020044270
}
---
# 批量下单 | 孙悟空
/sapi/v1/trade/batch\_orders
请求类型: POST
是否验签: 是
接口权限: 交易
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 接口用户合约批量下单交易
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
true
合约代码
margin\_mode
String
true
保证金模式;cross:全仓 ;
position\_side
String
false
开平方向
"long":多 "short":空 “both”:单向持仓,开平模式必填,买卖模式默认为both。
side
String
true
订单方向
buy:买 "sell":卖
type
String
true
订单类型;枚举
"market": 市价,"limit":限价, "post\_only":只挂单
price\_match
String
false
最优档位,和price互斥
opponent-对手价、opponent-对手价、"optimal\_5":最优5档,"optimal\_10":最优10档,"optimal\_20":最优20档
client\_order\_id
String
false
用户自定义订单ID
\[1-9223372036854775807\]
price
String
false
价格,仅当限价单的时候有效,市价无需输入。
volume
String
true
委托张数。
reduce\_only
Boolean
false
只减仓 0-否,1-是
time\_in\_force
String
false
枚举fok, ioc, gtc,非必填,默认是gtc
tp\_trigger\_price
String
false
止盈触发价格
tp\_order\_price
String
false
止盈委托价格(最优N档委托类型时无需填写价格)
tp\_type
String
false
止盈委托类型,不填默认为market: 市价,maket: 限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
tp\_trigger\_price\_type
String
false
止盈价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
sl\_trigger\_price
String
false
止损触发价格
sl\_order\_price
String
false
止损委托价格(最优N档委托类型时无需填写价格)
sl\_type
String
false
止损委托类型,不填默认为 市价,maket: 限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
sl\_trigger\_price\_type
String
false
止损价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
price\_protect
boolean
false
价差保护,默认为false。仅当设置止盈/止损需要该参数。
false 或者 true
self\_match\_prevent
String
false
防自成交
cancel\_taker: 撤销taker单 cancel\_maker:撤销maker单 cancel\_both:撤销全部订单
cancel\_taker
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
order\_id
String
true
订单ID
client\_order\_id
String
true
用户下单时填写的客户端订单ID,没填则不返回
备注: 备注: position\_side持仓方向 单向持仓模式下此参数非必填 如果填写仅可以选择both;在双向持仓模式下必填,且仅可选择 long 或 short。 双向持仓模式下,side和position\_side需要进行组合 买入开多(side 填写 buy; position\_side 填写 long ) 卖出开空(side 填写 sell; position\_side 填写 short ) 卖出平多(side 填写 sell;position\_side 填写 long ) 买入平空(side 填写 buy; position\_side 填写 short ) 单向持仓模式下,多仓返回buy,空仓返回sell
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan#xiang-ying-shi-li)
响应示例
[上一页下单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/xia-dan)
[下一页撤单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/che-dan)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/pi-liang-xia-dan#xiang-ying-shi-li)
复制
POST https://api.sunx.io/sapi/v1/trade/batch_orders?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
[{\
"time_in_force": "gtc",\
"price_protect": "true",\
"contract_code": "BTC-USDT-241115",\
"margin_mode": "cross",\
"position_side": "long",\
"price": 5000,\
"volume": 1,\
"side": "buy",\
"type": "limit"\
},\
{\
"time_in_force": "gtc",\
"price_protect": "true",\
"contract_code": "BTC-USDT-241115",\
"margin_mode": "cross",\
"position_side": "long",\
"price": 5000,\
"volume": 1,\
"side": "buy",\
"type": "limit"\
}]
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417232562245373953",\
"client_order_id": "1417232562245373953"\
},\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417232562245373952",\
"client_order_id": "1417232562245373952"\
}\
],
"ts": 1757936173760
}
---
# 订阅账户变动数据 | 孙悟空
####
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#account)
account
是否验签: 是
接口权限: 读取
限频: WebSocket私有订单成交推送接口(需要API KEY验签) 一个UID最多同时建立30个私有订单成交推送WS链接。该用户在一个品种(包含该品种的所有周期的合约)上,仅需要维持一个订单推送WS链接即可。 单个链接为50次/秒的请求,单个IP链接为100次/秒的请求。 注意: 订单推送WS的限频,跟用户RESTFUL私有接口的限频是分开的,相互不影响。
接口描述: 当账户的静态金额发生变化的时刻(冻结、释放保证金、资金费率结算、已实现盈亏等),推送如下账户相关信息
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/notification
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/notification
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#qing-qiu-can-shu)
请求参数
字段名称
类型
说明
op
string
必填;操作名称,sub 或 unsub;
cid
string
选填;Client 请求唯一 ID
topic
string
必填;account
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#gui-ze-shuo-ming)
规则说明
订阅(sub)
取消订阅(unsub)
规则
account
account
允许
account.contract\_code1
account.\*
不允许
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#ding-yue-can-shu)
订阅参数
参数
数据类型
是否必填
描述
取值范围
默认值

无数据
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#shu-ju-geng-xin)
数据更新
参数
数据类型
是否必填
描述
取值范围
op
String
true
操作名称
notify
topic
String
true
推送的主题
account
ts
long
true
服务端应答时间戳
event
String
true
账户变化通知相关事件说明
事件类型 snapshot:首推快照 create\_order: 订单下单 cancel\_order: 订单撤单 delivered:交割 transferred:划转 filled:成交 liquidation:强平 adl:ADL自动减仓 funding\_fee:资金费 set\_leverage:设置杠杆 price\_update :价格更新 (api 用户不要) auto\_exchange:自动兑换
uid
String
true
用户uid
true
state
String
true
账户状态
1(NORMAL):正常(交易,划转)、2(LOCKED):-暂时未用到、3(LIQUIDATING):强平中,不允许交易、划转、收取资金费、4(BANKRUPTCY):暂时未用到 5(ADL):adl中,不允许交易、收取资金费、划转、6(OPEN\_LIMIT):风控撤单中,合约交易只允许下减仓单,可以转入,不允许转出
equity
String
true
账户权益
initial\_margin
String
true
初始保证金
maintenance\_margin
String
true
维持保证金
maintenance\_margin\_rate
String
true
维持保证金率
profit\_unreal
String
true
未实现盈亏
available\_margin
String
true
可用保证金
voucher\_value
String
true
体验金(usdt)
created\_time
String
true
账户创建时间
updated\_time
String
true
账户更新时间
details
String
true
currency
String
true
币种
equity
String
true
该币种资产权益
available
String
true
该币种可用
withdraw\_available
String
true
该币种可转
profit\_unreal
String
true
未实现盈亏
initial\_margin
String
true
该币种初始保证金
maintenance\_margin
String
true
该币种维持保证金
maintenance\_margin\_rate
String
true
该币种维持保证金率
initial\_margin\_rate
String
true
该币种初始保证金率
voucher
String
true
体验金
voucher\_value
String
true
体验金(usdt)
created\_time
String
true
创建时间
updated\_time
String
true
更新时间
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#ding-yue-cheng-gong-shi-li)
订阅成功示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#shu-ju-geng-xin-shi-li)
数据更新示例
[上一页私有频道](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao)
[下一页订阅持仓变动数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju)
最后更新于1个月前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#ding-yue-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#qing-qiu-can-shu)
* [规则说明](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#gui-ze-shuo-ming)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#ding-yue-can-shu)
* [数据更新](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#shu-ju-geng-xin)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#ding-yue-cheng-gong-shi-li)
* [数据更新示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju#shu-ju-geng-xin-shi-li)
复制
{
"op": "sub",
"cid": "CEP7ozFIYa",
"topic": "account"
}
复制
{
"ch": "market.BTC-USDT.estimated_rate.1min",
"status": "ok",
"ts": 1757932916625,
"data": [\
{\
"id": 1757932860,\
"open": "0.0001",\
"close": "0.0001",\
"high": "0.0001",\
"low": "0.0001",\
"amount": "0",\
"vol": "0",\
"trade_turnover": "0",\
"count": "0"\
}\
]
}
复制
{
"op": "notify",
"topic": "account",
"contract_code": "",
"ts": 1734681235891,
"uid": "413120795",
"event": "snapshot",
"data": {
"equity": "10264.111400000000001",
"state": "normal",
"details": [\
{\
"currency": "USDT",\
"equity": "10264.111400000000001",\
"available": "10977.511400000000001",\
"profit_unreal": "-713.4",\
"initial_margin": "133.933333333333333333",\
"maintenance_margin": "6.027",\
"maintenance_margin_rate": "0.00058719160043411",\
"initial_margin_rate": "0.013048702231869125",\
"voucher": "",\
"voucher_value": "",\
"withdraw_available": "123456",\
"created_time": 1734675405381,\
"updated_time": 1734681182933\
},\
{\
"currency": "BTC",\
"equity": "0",\
"available": "0",\
"profit_unreal": "0",\
"initial_margin": "0",\
"maintenance_margin": "0",\
"maintenance_margin_rate": "0",\
"initial_margin_rate": "0",\
"voucher": "",\
"voucher_value": "",\
"withdraw_available": "123456",\
"created_time": 1734675456866,\
"updated_time": 1734675570751\
}\
],
"initial_margin": "133.933333333333333333",
"maintenance_margin": "6.027",
"maintenance_margin_rate": "0.00058719160043411",
"profit_unreal": "-713.4",
"available_margin": "10130.178066666666667667",
"created_time": 1734668300071,
"updated_time": 1734681182933,
"voucher_value": "",
"version": 1010
}
}
---
# 订阅持仓变动数据 | 孙悟空
positions.$contract\_code
是否验签: 是
接口权限: 读取
限频: WebSocket私有订单成交推送接口(需要API KEY验签) 一个UID最多同时建立30个私有订单成交推送WS链接。该用户在一个品种(包含该品种的所有周期的合约)上,仅需要维持一个订单推送WS链接即可。 单个链接为50次/秒的请求,单个IP链接为100次/秒的请求。 注意: 订单推送WS的限频,跟用户RESTFUL私有接口的限频是分开的,相互不影响。
接口描述: 当持仓信息发生变更时,例如形成仓位、加仓、平仓、逐仓增加/减少保证金等事件时,推送如下信息
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/notification
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/notification
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#qing-qiu-can-shu)
请求参数
字段名称
类型
说明
op
string
必填;操作名称,sub 或 unsub;
cid
string
选填;Client 请求唯一 ID
topic
string
必填; 固定 : positions
contract\_code
string
必填; contract\_code \* 或者 BTC-USDT 或者 BTC-USDT-240909
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#gui-ze-shuo-ming)
规则说明
订阅(sub)
取消订阅(unsub)
规则
\*
\*
允许
\*
contract\_code
不允许
contract\_code
\*
允许
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#ding-yue-can-shu)
订阅参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码,支持大小写
全部:\*(交割和永续), 永续:“BTC-USDT:... ,交割:"BTC-USDT-210625"...
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#shu-ju-geng-xin)
数据更新
参数
数据类型
是否必填
描述
取值范围
op
string
true
操作名称,推送固定值为 notify;--可不可以去掉
topic
string
true
推送的主题
例如: positions
contract\_code
string
true
订阅的contract\_code
\* 或者 BTC-USDT 或者 BTC-USDT-240909
ts
long
true
服务端应答时间戳
event
string
true
持仓变化通知相关事件说明
事件类型 snapshot:首推快照 create\_order: 订单下单 cancel\_order: 订单撤单 delivered:交割 transferred:划转 filled:成交 liquidation:强平 adl:ADL自动减仓 funding\_fee:资金费 set\_leverage:设置杠杆 price\_update :价格更新 (api 用户不要)
uid
string
true
用户uid
false
contract\_code
string
true
合约代码
position\_side
string
true
仓位方向
持仓方向 买卖模式下默认值both, 开平仓模式下: long:多 ,short:空
direction
string
true
订单方向
"buy":买, "sell":卖
margin\_mode
string
true
保证金模式
cross:全仓
open\_avg\_price
string
true
开仓均价
volume
string
true
持仓量(张)
available
string
true
可平仓数量(张)
fee
string
true
平仓手续费
lever\_rate
Long
true
杠杠倍数
adl\_risk\_percent
string
true
自动减仓指示
(1、2、3、4、5),1档风险最低,5档风险最高
liquidation\_price
string
true
预估强平价
initial\_margin
string
true
初始保证金,仅适用于全仓
maintenance\_margin
string
true
维持保证金
profit\_unreal
string
true
未实现盈亏
profit
string
true
平仓盈亏
profit\_rate
string
true
未实现收益率
margin\_rate
string
true
保证金率
state
string
true
仓位状态
normal, liq, adl
funding\_fee
string
true
累计资金费用
last\_price
string
true
最新价格
mark\_price
string
true
标记价格
contract\_type
string
true
业务类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
created\_time
string
true
创建时间
updated\_time
string
true
更新时间
version
int
true
版本号
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#ding-yue-cheng-gong-shi-li)
订阅成功示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#shu-ju-geng-xin-shi-li)
数据更新示例
[上一页订阅账户变动数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-zhang-hu-bian-dong-shu-ju)
[下一页订阅撮合后的订单数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cuo-he-hou-de-ding-dan-shu-ju)
最后更新于1个月前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#ding-yue-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#qing-qiu-can-shu)
* [规则说明](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#gui-ze-shuo-ming)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#ding-yue-can-shu)
* [数据更新](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#shu-ju-geng-xin)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#ding-yue-cheng-gong-shi-li)
* [数据更新示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-chi-cang-bian-dong-shu-ju#shu-ju-geng-xin-shi-li)
复制
{
"op": "sub",
"cid": "NuAWMqWKSI",
"topic": "positions",
"contract_code": "EOS-USDT"
}
复制
{
"op": "sub",
"cid": "NuAWMqWKSI",
"topic": "positions",
"ts": 1734683308615,
"err-code": 0,
"contract_code": "EOS-USDT"
}
复制
{
"op": "notify",
"topic": "positions",
"contract_code": "EOS-USDT",
"ts": 1734683308618,
"uid": "413120795",
"event": "snapshot",
"data": [\
{\
"contract_code": "EOS-USDT",\
"symbol": "EOS",\
"position_mode": "dual_side",\
"position_side": "short",\
"direction": "sell",\
"margin_mode": "cross",\
"open_avg_price": "0.492",\
"volume": "1",\
"available": "1",\
"fee": "0.8856",\
"lever_rate": 9,\
"adl_risk_percent": null,\
"liquidation_price": "11.408717810946043845",\
"initial_margin": "55.87624909281424",\
"maintenance_margin": "2.5144312091766408",\
"profit_unreal": "-10.88624183532816",\
"profit": "-21",\
"profit_rate": "-0.1948",\
"margin_rate": "0.000229358737821968",\
"state": "normal",\
"funding_fee": "-3.749999999225936542",\
"mark_price": "0.50289749455688544",\
"contract_type": "swap",\
"version": 21,\
"created_time": 1734675591497,\
"updated_time": 1734682810399\
}\
]
}
---
# 获取聚合行情 | 孙悟空
/sapi/v1/market/detail/merged
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: (1) restful接口:同一个IP, 所有业务(交割合约、币本位永续合约和U本位合约)总共1秒最多800个请求
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码 或 合约标识
永续:"BTC-USDT" ... ,交割:“BTC-USDT-210625”... 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.$contract\_code.detail.merged
status
string
true
请求处理结果
ok , "error"
object
true
开盘价和收盘价(从当天零点(UTC+8)开始)
id
long
true
K线ID,也就是K线时间戳
amount
string
true
成交量(币), 即 (成交量(张) \* 单张合约面值)(最近24(当前时间-24小时)小时成交量币)。 值是买卖双边之和
ask
array
true
\[卖1价,卖1量(张)\]
bid
array
true
\[买1价,买1量(张)\]
open
string
true
开盘价
close
string
true
收盘价,当K线为最晚的一根时,是最新成交价
count
decimal
true
成交笔数(当前时间-24小时)小时成交笔数)。 值是买卖双边之和
high
string
true
最高价
low
string
true
最低价
vol
string
true
成交量(张)(最近24(当前时间-24小时)小时成交量张)。 值是买卖双边之和
trade\_turnover
string
true
成交额,即 sum(每一笔成交张数 \* 合约面值 \* 成交价格)(当前时间-24小时)小时成交额)。 值是买卖双边之和
ts
long
true
时间戳
false
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing#xiang-ying-shi-li)
响应示例
[上一页获取K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju)
[下一页获取市场最近成交记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing#xiang-ying-shi-li)
复制
curl "https://api.sunx.io/sapi/v1/market/detail/merged?contract_code=BTC-USDT"
复制
{
"ch": "market.BTC-USDT.detail.merged",
"status": "ok",
"tick": {
"amount": "12.526",
"ask": [\
13084.2,\
131\
],
"bid": [\
13082.9,\
38\
],
"close": "13076.8",
"count": 2920,
"high": "13205.3",
"id": 1603695162,
"low": "12877.5",
"open": "12916.2",
"trade_turnover": "163247.3982",
"ts": 1603695162580,
"vol": "12526"
},
"ts": 1603695162580
}
---
# 获取行情深度数据 | 孙悟空
/sapi/v1/market/depth
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: (1) restful接口:同一个IP, 所有业务(交割合约、币本位永续合约和U本位合约)总共1秒最多800个请求
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
false
合约代码 或 合约标识
永续:"BTC-USDT" ... ,交割:“BTC-USDT-210625”... 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
type
string
true
深度类型
(150档数据) step0, step1, step2, step3, step4, step5, step14, step15, step16, step17(合并深度1-5,14-17);step0时,不合并深度, (20档数据) step6, step7, step8, step9, step10, step11, step12, step13, step18, step19(合并深度7-13,18-19);step6时,不合并深度
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.period
status
string
true
请求处理结果
ok , "error"
object
true
asks
array
false
卖盘,\[price(挂单价), vol(此价格挂单张数)\], 按price升序
bids
array
false
买盘,\[price(挂单价), vol(此价格挂单张数)\], 按price降序
ch
string
true
数据所属的 channel,格式: market.period
id
long
true
消息id
mrid
long
true
订单ID
ts
long
true
消息生成时间,单位:毫秒.
version
long
true
版本
false
ts
long
true
响应生成时间点,单位:毫秒
备注: 合并深度仅改变显示方式,不改变实际成交价格。 step16、step17、step18、step19仅供SHIB-USDT合约使用,暂不支持其他合约使用。 step1至step5, step14至step17是进行了深度合并后的150档深度数据,step7至step13, step18, step19 是进行了深度合并后的20档深度数据,对应精度如下: Depth 类型 精度 step16、step18 0.0000001 step17、step19 0.000001 step1、step7 0.00001 step2、step8 0.0001 step3、step9 0.001 step4、step10 0.01 step5、step11 0.1 step14、step12 1 step15、step13 10
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju#xiang-ying-shi-li)
响应示例
[上一页行情数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju)
[下一页获取K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju)
最后更新于24天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju#xiang-ying-shi-li)
复制
curl "https://api.sunx.io/sapi/v1/market/depth?contract_code=BTC-USDT&type=step0"
复制
{
"ch": "market.BTC-USDT.depth.step0",
"status": "ok",
"tick": {
"mrid": 100000019245599,
"id": 1758016468,
"bids": [\
[\
115507.7,\
41\
],\
[\
115426.9,\
4\
],\
[\
115411.9,\
4\
],\
[\
115396.9,\
4\
],\
[\
115381.9,\
4\
],\
[\
115366.9,\
4\
],\
[\
115351.9,\
5\
],\
[\
115336.9,\
4\
],\
[\
115321.9,\
4\
],\
[\
115306.9,\
4\
],\
[\
115291.9,\
4\
]\
],
"asks": [\
[\
115580.2,\
4\
],\
[\
115583.2,\
41\
],\
[\
115595.2,\
4\
],\
[\
115610.2,\
4\
],\
[\
115625.2,\
4\
],\
[\
115640.2,\
5\
],\
[\
115655.2,\
5\
],\
[\
115670.2,\
5\
],\
[\
115685.2,\
5\
],\
[\
115700.2,\
5\
],\
[\
115715.2,\
5\
]\
],
"ts": 1758016468240,
"version": 1758016468,
"ch": "market.BTC-USDT.depth.step0"
},
"ts": 1758016470037
}
---
# 获取K线数据 | 孙悟空
/sapi/v1/market/history/kline
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: (1) restful接口:同一个IP, 所有业务(交割合约、币本位永续合约和U本位合约)总共1秒最多800个请求
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码 或 合约标识
永续:"BTC-USDT" ... ,交割:“BTC-USDT-210625”... 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
period
string
true
K线类型
1min, 5min, 15min, 30min, 60min,4hour,1day,1week,1mon
size
int
false
获取数量,默认150
\[1,2000\]
from
long
false
开始时间戳 10位 单位S
to
long
false
结束时间戳 10位 单位S
备注: 1、size与from&to 必填其一,若全不填则返回空数据。 2、如果填写from,也要填写to。最多可获取连续两年的数据。 3、如果size、from、to 均填写,会忽略from、to参数。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.period
object array
true
id
long
true
K线ID,也就是K线时间戳,K线起始时间
vol
decimal
true
成交量(张)。 值是买卖双边之和
count
decimal
true
成交笔数。 值是买卖双边之和
open
decimal
true
开盘价
close
decimal
true
收盘价,当K线为最晚的一根时,是最新成交价
low
decimal
true
最低价
high
decimal
true
最高价
amount
decimal
true
成交量(币), 即 (成交量(张) \* 单张合约面值)。 值是买卖双边之和
trade\_turnover
decimal
true
成交额,即 sum(每一笔成交张数 \* 合约面值 \* 成交价格)。 值是买卖双边之和
false
status
string
true
请求处理结果
ok , "error"
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju#xiang-ying-shi-li)
响应示例
[上一页获取行情深度数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-hang-qing-shen-du-shu-ju)
[下一页获取聚合行情](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qukxian-shu-ju#xiang-ying-shi-li)
复制
curl "https://api.sunx.io/sapi/v1/market/history/kline?contract_code=BTC-USDT&period=1day"
复制
{
"ch": "market.BTC-USDT.kline.1day",
"ts": 1757931133018,
"status": "ok",
"data": [\
{\
"id": 1757433600,\
"open": 113608.0,\
"close": 113862.3,\
"high": 114263.7,\
"low": 113340.9,\
"amount": 1.16,\
"vol": 1160,\
"trade_turnover": 132119.9386,\
"count": 579\
},\
{\
"id": 1757520000,\
"open": 113818.2,\
"close": 114209.0,\
"high": 114682.5,\
"low": 113131.5,\
"amount": 11.132,\
"vol": 11132,\
"trade_turnover": 1268248.2292,\
"count": 5491\
}\
]
}
---
# 获取市场最优挂单 | 孙悟空
/sapi/v1/market/bbo
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: (1) restful接口:同一个IP, 所有业务(交割合约、币本位永续合约和U本位合约)总共1秒最多800个请求
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。 business\_type 在查询交割合约数据时为必填参数。且参数值要传:futures 或 all 。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
false
合约代码 或 合约标识
永续:"BTC-USDT" ... ,交割:“BTC-USDT-210625”... 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
business\_type
string
false
业务类型,不填默认永续
futures:交割、swap:永续、all:全部
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
status
string
true
请求处理结果
ok , "error"
object array
true
contract\_code
string
true
合约代码 或 合约标识
永续:"BTC-USDT" ... ,交割:“BTC-USDT-210625”... 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
business\_type
string
true
业务类型
futures:交割、swap:永续
mrid
long
true
撮合ID,唯一标识
ask
array
false
\[卖1价,卖1量(张)\]
bid
array
false
\[买1价,买1量(张)\]
ts
long
true
系统检测orderbook时间点,单位:毫秒
false
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan#xiang-ying-shi-li)
响应示例
[上一页获取市场最近成交记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu)
[下一页批量获取最近的交易记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan#xiang-ying-shi-li)
复制
GET https://api.sunx.io/sapi/v1/market/bbo?contract_code=BTC-USDT
复制
{
"status": "ok",
"ticks": [\
{\
"trade_partition": "USDT",\
"business_type": "swap",\
"contract_code": "BTC-USDT",\
"ask": [\
114881.2,\
34\
],\
"bid": [\
114860.2,\
5\
],\
"mrid": 100000016261408,\
"ts": 1757931638127\
}\
],
"ts": 1757931643221
}
---
# 获取标记价格的K线数据 | 孙悟空
/sapi/v1/index/market/history/linear\_swap\_mark\_price\_kline
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: (1) restful接口:同一个IP, 所有业务(交割合约、币本位永续合约和U本位合约)总共1秒最多800个请求
接口描述: 该接口支持全仓模式和逐仓模式。 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码 或 合约标识
永续:"BTC-USDT" ... ,交割:“BTC-USDT-210625”... 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
period
string
true
K线类型
1min, 5min, 15min, 30min, 60min,4hour,1day, 1week,1mon
size
int
true
K线获取数量
\[1,2000\]
备注: 最多一次2000条数据 入参大小写不敏感,均支持
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.period
object array
true
id
long
true
k线id
vol
string
true
成交量(张),数值为0
count
string
true
成交笔数,数值为0
open
string
true
开盘值
close
string
true
收盘值
low
string
true
最低值
high
string
true
最高值
amount
string
true
成交量(币), 数值为0
trade\_turnover
string
true
成交额, 数值为0
false
status
string
true
请求处理结果
ok , "error"
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju#xiang-ying-shi-li)
响应示例
[上一页批量获取最近的交易记录](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu)
[下一页获取合约的溢价指数K线](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju#xiang-ying-shi-li)
复制
curl "https://api.sunx.io/sapi/v1/index/market/history/linear_swap_mark_price_kline?contract_code=BTC-USDT&period=5min&size=100"
复制
{
"ch": "market.BTC-USDT.mark_price.5min",
"data": [\
{\
"amount": "0",\
"close": "31078.68",\
"count": "0",\
"high": "31078.68",\
"id": 1611105300,\
"low": "31078.68",\
"open": "31078.68",\
"trade_turnover": "0",\
"vol": "0"\
},\
{\
"amount": "0",\
"close": "31078.68",\
"count": "0",\
"high": "31078.68",\
"id": 1611105600,\
"low": "31078.68",\
"open": "31078.68",\
"trade_turnover": "0",\
"vol": "0"\
}\
],
"status": "ok",
"ts": 1611106791703
}
---
# 获取市场最近成交记录 | 孙悟空
/sapi/v1/market/trade
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: (1) restful接口:同一个IP, 所有业务(交割合约、币本位永续合约和U本位合约)总共1秒最多800个请求
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。 business\_type 在查询交割合约数据时为必填参数。且参数值要传:futures 或 all 。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
false
合约代码 或 合约标识
永续:"BTC-USDT" ... ,交割:“BTC-USDT-210625”... 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
business\_type
string
false
业务类型,不填默认永续
futures:交割、swap:永续、all:全部
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.$symbol.trade.detail
status
string
true
ok,"error"
object
true
id
long
true
订单唯一id(品种唯一)
ts
long
true
最新成交时间
object array
true
amount
string
true
成交量(张)。 值是买卖双边之和
direction
string
true
买卖方向,即taker(主动成交)的方向
id
long
true
成交唯一id(品种唯一)
price
string
true
成交价
ts
long
true
成交时间
quantity
string
true
成交量(币)
contract\_code
string
true
合约代码
business\_type
string
true
业务类型
futures:交割、swap:永续
trade\_turnover
string
true
成交额(计价币种)
trade\_partition
string
true
参数已废弃
false
false
ts
long
true
发送时间
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu#xiang-ying-shi-li)
响应示例
[上一页获取聚合行情](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-ju-he-hang-qing)
[下一页获取市场最优挂单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-jin-cheng-jiao-ji-lu#xiang-ying-shi-li)
复制
curl "https://api.sunx.io/sapi/v1/market/trade"
复制
{
"ch": "market.BTC-USDT.trade.detail",
"status": "ok",
"tick": {
"data": [\
{\
"amount": "2",\
"quantity": "0.002",\
"trade_turnover": "231.1328",\
"ts": 1758015518607,\
"id": 1000000192444090000,\
"price": "115566.4",\
"direction": "sell",\
"contract_code": "BTC-USDT",\
"business_type": "swap",\
"trade_partition": "USDT"\
}\
],
"id": 1758016716711,
"ts": 1758016716711
},
"ts": 1758016716711
}
---
# 获取合约的溢价指数K线 | 孙悟空
/sapi/v1/index/market/history/linear\_swap\_premium\_index\_kline
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: (1) restful接口:同一个IP, 所有业务(交割合约、币本位永续合约和U本位合约)总共1秒最多800个请求
接口描述: 该接口支持全仓模式和逐仓模式
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码
BTC-USDT,"ETH-USDT"...
period
string
true
K线类型
1min, 5min, 15min, 30min, 60min,4hour,1day, 1week,1mon
size
int
true
K线获取数量
\[1,2000\]
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.period
object array
true
id
long
true
k线id
vol
string
true
成交量(张),数值为0
count
string
true
成交笔数,数值为0
open
string
true
开盘值(溢价指数)
close
string
true
收盘值(溢价指数)
low
string
true
最低值(溢价指数)
high
string
true
最高值(溢价指数)
amount
string
true
成交量(币), 数值为0
trade\_turnover
string
true
成交额, 数值为0
false
status
string
true
请求处理结果
ok , "error"
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian#xiang-ying-shi-li)
响应示例
[上一页获取标记价格的K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju)
[下一页获取实时预测资金费率的K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian#xiang-ying-shi-li)
复制
curl "https://api.sunx.io/sapi/v1/index/market/history/linear_swap_premium_index_kline?contract_code=BTC-USDT&period=1min&size=1"
复制
{
"ch": "market.BTC-USDT.premium_index.1min",
"data": [\
{\
"amount": "0",\
"close": "0.0000079166666666",\
"count": "0",\
"high": "0.0000079166666666",\
"id": 1603696920,\
"low": "0.0000079166666666",\
"open": "0.0000079166666666",\
"trade_turnover": "0",\
"vol": "0"\
}\
],
"status": "ok",
"ts": 1603696958348
}
---
# 批量获取最近的交易记录 | 孙悟空
/sapi/v1/market/history/trade
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: (1) restful接口:同一个IP, 所有业务(交割合约、币本位永续合约和U本位合约)总共1秒最多800个请求
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625;同时支持合约标识,格式为 BTC-USDT(永续)、BTC-USDT-CW(当周)、BTC-USDT-NW(次周)、BTC-USDT-CQ(当季)、BTC-USDT-NQ(次季)。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码 或 合约标识
永续:"BTC-USDT" ... ,交割:“BTC-USDT-210625”... 或 BTC-USDT-CW(当周合约标识)、BTC-USDT-NW(次周合约标识)、BTC-USDT-CQ(当季合约标识)、BTC-USDT-NQ(次季合约标识)
size
int
true
获取交易记录的数量,默认1
\[1, 2000\]
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.$contract\_code.trade.detail
object array
true
object array
true
amount
decimal
true
成交量(张)。 值是买卖双边之和
direction
string
true
买卖方向,即taker(主动成交)的方向
id
long
true
成交唯一id(品种唯一)
price
decimal
true
成交价格
ts
long
true
成交时间
quantity
decimal
true
成交量(币)
trade\_turnover
decimal
true
成交额(计价币种)
false
id
long
true
订单唯一id(品种唯一)
ts
long
true
最新成交时间
false
status
string
true
ok,"error"
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu#xiang-ying-shi-li)
响应示例
[上一页获取市场最优挂单](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-chang-zui-you-gua-dan)
[下一页获取标记价格的K线数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-biao-ji-jia-ge-dekxian-shu-ju)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/pi-liang-huo-qu-zui-jin-de-jiao-yi-ji-lu#xiang-ying-shi-li)
复制
GET https://api.sunx.io/sapi/v1/market/history/trade?contract_code=BTC-USDT&size=1
复制
{
"ch": "market.BTC-USDT.trade.detail",
"ts": 1757932114663,
"status": "ok",
"data": [\
{\
"id": 100000016279612,\
"ts": 1757932102168,\
"data": [\
{\
"amount": 2,\
"quantity": 0.002,\
"trade_turnover": 229.4006,\
"ts": 1757932102168,\
"id": 1000000162796120000,\
"price": 114700.3,\
"direction": "sell"\
}\
]\
}\
]
}
---
# 查询用户当前的下单量限制 | 孙悟空
/sapi/v1/trade/order\_limit
请求类型: POST
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 该接口支持全仓模式和逐仓模式 请求参数contract\_code支持交割合约代码,格式为BTC-USDT-210625。 pair、contract\_type和contract\_code同时填写,优先取contract\_code。 business\_type 在查询交割合约数据时为必填参数。且参数值要传:futures 或 all 。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
false
合约代码
永续"BTC-USDT"... ,交割:"BTC-USDT-220325"...
order\_price\_type
string
true
订单报价类型
limit:限价,"opponent":对手价,"lightning":闪电平仓,"optimal\_5":最优5档,"optimal\_10":最优10档,"optimal\_20":最优20档,"fok":FOK订单,"ioc":IOC订单,opponent\_ioc": 对手价-IOC下单,"lightning\_ioc":闪电平仓-IOC下单,"optimal\_5\_ioc":最优5档-IOC下单,"optimal\_10\_ioc":最优10档-IOC下单,"optimal\_20\_ioc":最优20档-IOC下单,"opponent\_fok": 对手价-FOK下单,"lightning\_fok":闪电平仓-FOK下单,"optimal\_5\_fok":最优5档-FOK下单,"optimal\_10\_fok":最优10档-FOK下单,"optimal\_20\_fok":最优20档-FOK下单
pair
string
false
交易对
BTC-USDT
contract\_type
string
false
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
business\_type
string
false
业务类型,不填默认永续
futures:交割、swap:永续、all:全部
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
status
string
false
请求处理结果
ok , "error"
ts
long
true
响应生成时间点,单位:毫秒
false
order\_price\_type
string
true
订单报价类型
limit:限价,"opponent":对手价,"lightning":闪电平仓,"optimal\_5":最优5档,"optimal\_10":最优10档,"optimal\_20":最优20档,"fok":FOK订单,"ioc":IOC订单,opponent\_ioc": 对手价-IOC下单,"lightning\_ioc":闪电平仓-IOC下单,"optimal\_5\_ioc":最优5档-IOC下单,"optimal\_10\_ioc":最优10档-IOC下单,"optimal\_20\_ioc":最优20档-IOC下单,"opponent\_fok": 对手价-FOK下单,"lightning\_fok":闪电平仓-FOK下单,"optimal\_5\_fok":最优5档-FOK下单,"optimal\_10\_fok":最优10档-FOK下单,"optimal\_20\_fok":最优20档-FOK下单
(属性名称:list)
false
symbol
string
true
品种代码
BTC,"ETH"...
contract\_code
string
true
合约代码
永续"BTC-USDT"... ,交割:"BTC-USDT-220325"...
open\_limit
decimal
true
合约开仓单笔下单量最大值
close\_limit
decimal
true
合约平仓单笔下单量最大值
contract\_type
string
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
pair
string
true
交易对
如:“BTC-USDT”
business\_type
string
true
业务类型
futures:交割、swap:永续
false
false
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi#xiang-ying-shi-li)
响应示例
[上一页查询订单信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi)
[下一页持仓类](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/chi-cang-lei)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi#xiang-ying-shi-li)
复制
POST https://api.sunx.io/sapi/v1/trade/order_limit?order_price_type=limit&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"order_price_type":"limit"
}
复制
{
"status": "ok",
"data": {
"order_price_type": "limit",
"list": [\
{\
"symbol": "BTC",\
"contract_code": "BTC-USDT",\
"open_limit": 170000,\
"close_limit": 170000,\
"business_type": "swap",\
"contract_type": "swap",\
"pair": "BTC-USDT"\
}\
]
},
"ts": 1638760136200
}
---
# 获取实时预测资金费率的K线数据 | 孙悟空
/sapi/v1/index/market/history/linear\_swap\_estimated\_rate\_kline
请求类型: GET
是否验签: 否
接口权限: 读取
限频: 行情类的公开接口,比如:获取K线数据、获取聚合行情、市场行情、获取行情深度数据、获取溢价指数K线、获取实时预测资金费率k线,获取基差数据、获取市场最近成交记录: (1) restful接口:同一个IP, 所有业务(交割合约、币本位永续合约和U本位合约)总共1秒最多800个请求
接口描述: 该接口支持全仓模式和逐仓模式
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码
BTC-USDT,"ETH-USDT"...
period
string
true
K线类型
1min, 5min, 15min, 30min, 60min,4hour,1day, 1week,1mon
size
int
true
K线获取数量
\[1,2000\]
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
ch
string
true
数据所属的 channel,格式: market.period
object array
true
id
long
true
k线id
vol
string
true
成交量(张),数值为0
count
string
true
成交笔数,数值为0
open
string
true
开盘值(预测资金费率)
close
string
true
收盘值 (预测资金费率)
low
string
true
最低值 (预测资金费率)
high
string
true
最高值 (预测资金费率)
amount
string
true
成交量(币), 数值为0
trade\_turnover
string
true
成交额, 数值为0
false
status
string
true
请求处理结果
ok , "error"
ts
long
true
响应生成时间点,单位:毫秒
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju#xiang-ying-shi-li)
响应示例
[上一页获取合约的溢价指数K线](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-he-yue-de-yi-jia-zhi-shukxian)
[下一页钱包](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/qian-bao)
最后更新于1个月前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/hang-qing-shu-ju/huo-qu-shi-shi-yu-ce-zi-jin-feildekxian-shu-ju#xiang-ying-shi-li)
复制
curl "https://api.sunx.io/sapi/v1/index/market/history/linear_swap_estimated_rate_kline?contract_code=BTC-USDT&period=1min&size=1"
复制
{
"ch": "market.BTC-USDT.estimated_rate.1min",
"data": [\
{\
"amount": "0",\
"close": "0.0001",\
"count": "0",\
"high": "0.0001",\
"id": 1603697100,\
"low": "0.0001",\
"open": "0.0001",\
"trade_turnover": "0",\
"vol": "0"\
}\
],
"status": "ok",
"ts": 1603697104902
}
---
# 查询成交明细 | 孙悟空
/sapi/v1/trade/order/details
请求类型: GET
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用于查询合约进3天订单成交明细
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
false
合约代码
order\_id
String
false
订单的订单 ID
start\_time
String
false
查询开始时间,UNIX时间戳,以毫秒为单位。
取值范围 \[((end-time) – 48h), (end-time)\] ,查询窗口最大为48小时,窗口平移范围为最近90天。 默认值 (now) – 48h
end\_time
String
false
查询结束时间,UNIX时间戳,以毫秒为单位。
取值范围 \[(present-90d), present\] ,查询窗口最大为48小时,窗口平移范围为最近90天。 默认值:now
from
Long
false
查询的起始id,默认从0开始
limit
Integer
false
分页页面大小,默认为10,最大为100。
direct
String
false
翻页方向,prev, next,默认next
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
id
String
true
查询id
contract\_code
String
true
合约代码
永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
order\_id
String
true
订单ID
trade\_id
String
true
成交id
side
String
true
交易方向,buy表示买,sell表示卖。
position\_side
String
true
仓位方向
"long":多 "short":空 “both”:单向持仓
order\_type
String
true
成交类型 "1":"trade", "3":"liquidation" ,"4":"delivery","22":"adl"
margin\_mode
String
true
保证金模式
cross:全仓
type
String
true
订单类型;枚举market, limit, post\_only
role
String
true
成交角色maker, taker
trade\_price
String
true
成交价格
trade\_volume
String
true
成交量(张)
trade\_turnover
String
true
成交金额(成交数量 \* 合约面值 \* 成交价格)
created\_time
String
true
创建时间
updated\_time
String
true
更新时间,默认为撮合成交时间
order\_source
String
true
订单来源;
system:系统、web:用户网页、api:用户API、m:用户M站、risk:风控系统、settlement:交割结算、ios:ios客户端、android:安卓客户端、windows:windows客户端、mac:mac客户端、trigger:计划委托触发、tpsl:止盈止损触发、ADL: adl订单)
fee\_currency
String
true
手续费币种,多个则使用","分隔
trade\_fee
String
true
总手续费(U)
deduction\_price
String
true
抵扣币种价格(USDT)
profit
String
true
平仓盈亏
contract\_type
String
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi#xiang-ying-shi-li)
响应示例
[上一页查询当前委托](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo)
[下一页查询历史委托](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi#xiang-ying-shi-li)
复制
GET https://api.sunperp.com/sapi/v1/trade/order/details?order_id=1343541341268738048&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"id": "1124147771",\
"contract_code": "BTC-USDT",\
"order_id": "1343541341268738048",\
"trade_id": "100000032538647",\
"side": "sell",\
"position_side": "short",\
"order_type": "1",\
"margin_mode": "cross",\
"type": "limit",\
"role": "TAKER",\
"trade_price": "31400",\
"trade_volume": "1",\
"trade_turnover": "31.4",\
"created_time": 1740366817564,\
"updated_time": 1740366817564,\
"order_source": "api",\
"fee_currency": "USDT",\
"trade_fee": "0.01884",\
"deduction_price": "",\
"profit": "0",\
"contract_type": "swap"\
}\
],
"ts": 1740377316667
}
---
# 订阅订单数据 | 孙悟空
orders.$contract\_code
是否验签: 是
接口权限: 读取
限频: WebSocket私有订单成交推送接口(需要API KEY验签) 一个UID最多同时建立30个私有订单成交推送WS链接。该用户在一个品种(包含该品种的所有周期的合约)上,仅需要维持一个订单推送WS链接即可。 单个链接为50次/秒的请求,单个IP链接为100次/秒的请求。 注意: 订单推送WS的限频,跟用户RESTFUL私有接口的限频是分开的,相互不影响。
接口描述: 当订单发生下单、订单撤单等事件时,推送消息。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#ding-yue-di-zhi)
订阅地址
环境
地址
线上环境
wss://api.sunx.io/ws/v1/notification
线上环境(aws客户首选)
wss://api.sunx.io/ws/v1/notification
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#qing-qiu-can-shu)
请求参数
字段名称
类型
说明
op
string
必填;操作名称,sub 或 unsub;
cid
string
选填;Client 请求唯一 ID
topic
string
必填; orders
contract\_code
string
必填; contract\_code \* 或者 BTC-USDT 或者 BTC-USDT-240909
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#gui-ze-shuo-ming)
规则说明
订阅(sub)
取消订阅(unsub)
规则
\*
\*
允许
\*
contract\_code
不允许
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#ding-yue-can-shu)
订阅参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
string
true
合约代码,支持大小写
全部:\*(交割和永续), 永续:“BTC-USDT:... ,交割:"BTC-USDT-210625"...
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#shu-ju-geng-xin)
数据更新
参数
数据类型
是否必填
描述
取值范围
op
String
true
操作名称,推送固定值为 notify;--可不可以去掉
topic
String
true
推送的主题
orders
ts
long
true
服务端应答时间戳
uid
String
true
用户uid
false
contract\_code
String
true
合约代码
永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"..
side
String
true
买卖方向
buy:买 "sell":卖
position\_side
String
true
仓位方向
"long":多 "short":空 “both”:单向持仓
type
String
true
订单类型;枚举
"market": 市价,"limit":限价, "post\_only":只挂单
price\_match
String
true
价格匹配
order\_id
String
true
订单id
client\_order\_id
String
true
用户自定义订单ID
margin\_mode
String
true
保证金模式
枚举 cross
price
String
true
委托价格
volume
String
true
委托数量
lever\_rate
Long
true
杠杆等级
state
string
true
订单状态
new, partially\_filled, , partially\_canceled, filled ,canceled,
order\_source
String
true
订单来源
(system:系统、web:用户网页、api:用户API、m:用户M站、risk:风控系统、settlement:交割结算、ios:ios客户端、android:安卓客户端、windows:windows客户端、mac:mac客户端、trigger:计划委托触发、tpsl:止盈止损触发、ADL: adl订单)
reduce\_only
Boolean
true
只减仓
time\_in\_force
String
true
枚举fok, ioc, gtc,非必填,默认是gtc
trade\_avg\_price
String
true
成交均价
trade\_volume
String
true
成交数量
trade\_turnover
String
true
成交金额
fee\_currency
String
true
手续费币种,多个则使用","分隔
fee
String
true
总手续费(U)
tp\_trigger\_price
String
true
止盈触发价格
tp\_order\_price
String
true
止盈委托价格(最优N档委托类型时无需填写价格)
tp\_type
String
true
止盈委托类型,不填默认为market: 市价,maket: 限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
tp\_trigger\_price\_type
String
false
止盈价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
sl\_trigger\_price
String
true
止损触发价格
sl\_order\_price
String
true
止损委托价格(最优N档委托类型时无需填写价格)
sl\_type
String
true
止损委托类型,不填默认为 市价,maket: 限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
sl\_trigger\_price\_type
String
false
止损价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
price\_protect
boolean
false
价差保护,默认为false。仅当设置止盈/止损需要该参数。
false 或者 true
profit
String
true
平仓盈亏
contract\_type
String
true
业务类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
created\_time
String
true
订单创建时间, UTC时间戳(MS)
updated\_time
String
true
订单更新时间, UTC时间戳(MS)
self\_match\_prevent
String
true
防自成交
cancel\_taker: 撤销taker单 cancel\_maker:撤销maker单 cancel\_both:撤销全部订单
false
备注: 假设订单一次成交,且匹配了多个完全成交,则订单频道多次推送的状态都是“filled-完全成交“,但成交量可能小于下单量. 假设IOC订单部分成交剩余撤单,则订单频道多次推送的状态都是“partially\_canceled-部分被撤销“,但成交量 + 撤单量可能小于下单量. 建议: 成交量 + 撤单量 是否等于 下单量 来辅助判断是否为最后一次更新
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#ding-yue-shi-li)
订阅示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#ding-yue-cheng-gong-shi-li)
订阅成功示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#shu-ju-geng-xin-shi-li)
数据更新示例
[上一页订阅成交变动数据](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-cheng-jiao-bian-dong-shu-ju)
[下一页公共频道](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/gong-gong-pin-dao)
最后更新于1个月前
* [订阅地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#ding-yue-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#qing-qiu-can-shu)
* [规则说明](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#gui-ze-shuo-ming)
* [订阅参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#ding-yue-can-shu)
* [数据更新](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#shu-ju-geng-xin)
* [订阅示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#ding-yue-shi-li)
* [订阅成功示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#ding-yue-cheng-gong-shi-li)
* [数据更新示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/websocket-ding-yue/si-you-pin-dao/ding-yue-ding-dan-shu-ju#shu-ju-geng-xin-shi-li)
复制
{
"op": "sub",
"cid": "zTX5sUJscf",
"topic": "orders",
"contract_code": "EOS-USDT"
}
复制
{
"op": "auth",
"type": "api",
"err-code": 0,
"ts": 1734516850688,
"data": {
"user-id": "41312018"
}
}
复制
{
"op": "notify",
"topic": "orders",
"contract_code": "SHIB-USDT",
"ts": 1749457082349,
"uid": "502061937",
"data": {
"side": "buy",
"type": "limit",
"price": "0.0000124",
"volume": "2",
"state": "new",
"profit": "0",
"contract_code": "SHIB-USDT",
"position_side": "short",
"price_match": "opponent",
"order_id": "1381668675223068672",
"client_order_id": "1381668675223068672",
"margin_mode": "cross",
"lever_rate": 30,
"order_source": "web",
"reduce_only": true,
"time_in_force": "gtc",
"trade_avg_price": "0",
"trade_volume": "0",
"trade_turnover": "0",
"fee_currency": null,
"fee": "0",
"tp_trigger_price": "",
"tp_order_price": "",
"tp_type": "",
"tp_trigger_price_type": "",
"sl_trigger_price": "",
"sl_order_price": "",
"sl_type": "",
"sl_trigger_price_type": "",
"contract_type": "swap",
"cancel_reason": "",
"created_time": 1749457082341,
"updated_time": 1749457082341,
"self_match_prevent":"cancel_taker"
}
}
---
# 查询订单信息 | 孙悟空
/sapi/v1/trade/order
请求类型: GET
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用于查询订单的信息。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
true
合约代码(币对)
"BTC-USDT"...
margin\_mode
String
true
保证金模式 cross:全仓 ;
order\_id
String
false
订单id,order\_id和client\_order\_id必填写一个,若都填写了以order\_id为准
client\_order\_id
String
false
用户自定义订单ID
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
id
String
true
查询id
contract\_code
String
true
合约代码
永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
side
String
true
买卖方向
buy:买 "sell":卖
position\_side
String
true
仓位方向
"long":多 "short":空 “both”:单向持仓
type
String
true
订单类型;枚举
"market": 市价,"limit":限价, "post\_only":只挂单
price\_match
String
true
最优档位
opponent-对手价、"optimal\_5":最优5档,"optimal\_10":最优10档,"optimal\_20":最优20档
order\_id
String
true
订单id
client\_order\_id
String
true
用户自定义订单ID
margin\_mode
String
true
保证金模式
枚举 cross
price
String
true
委托价格
volume
String
true
委托数量
lever\_rate
Long
false
杠杆等级
state
String
true
订单状态
new, partially\_filled, filled, partially\_canceled, canceled,rejected
order\_source
String
true
订单来源
(system:系统、web:用户网页、api:用户API、m:用户M站、risk:风控系统、settlement:交割结算、ios:ios客户端、android:安卓客户端、windows:windows客户端、mac:mac客户端、trigger:计划委托触发、tpsl:止盈止损触发、ADL: adl订单)
reduce\_only
Boolean
true
只减仓
False、True
time\_in\_force
String
true
枚举fok, ioc, gtc,非必填,默认是gtc
tp\_trigger\_price
String
true
止盈触发价格
tp\_order\_price
String
true
止盈委托价格(最优N档委托类型时无需填写价格)
tp\_type
String
true
止盈委托类型,不填默认为market: 市价,maket: 限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
tp\_trigger\_price\_type
String
false
止盈价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
sl\_trigger\_price
String
true
止损触发价格
sl\_order\_price
String
true
止损委托价格(最优N档委托类型时无需填写价格)
sl\_type
String
true
止损委托类型,不填默认为 市价,maket: 限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
sl\_trigger\_price\_type
String
false
止损价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
trade\_avg\_price
String
true
成交均价
trade\_volume
String
true
成交数量
trade\_turnover
String
true
成交总金额
fee\_currency
String
true
手续费币种,多个则使用","分隔
fee
String
true
总手续费(U)
price\_protect
boolean
false
价差保护,默认为false。仅当设置止盈/止损需要该参数。
false 或者 true
profit
String
true
平仓盈亏(使用持仓均价计算,不包含仓位跨结算的已实现盈亏。)
contract\_type
String
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
cancel\_reason
String
true
撤单原因
created\_time
String
true
订单创建时间, UTC时间戳(MS)
"Limit order cancelation by the client":"用户主动撤销普通限价订单","Order cancelation by system":"系统撤单","Market order circuit-breaker":"市价单熔断","Bankruptcy price of market order":"市价单破产价","Order cancelation due to no matching orders":"没有对手盘导致撤单"," Self trading prevention":"防自成交撤单","Number of maker orders matched with your taker orders exceeding limit":"成交笔数超过最大限制","Order cancelation due to API timeout":"API超时撤单"
updated\_time
String
true
订单更新时间, UTC时间戳(MS)
self\_match\_prevent
String
true
防自成交
cancel\_taker: 撤销taker单 cancel\_maker:撤销maker单 cancel\_both:撤销全部订单
备注: 下列行为,都属于"Order cancelation by system":"系统撤单"的范围。 FOK order cancelation-- fok撤单 IOC order cancelation-- ioc撤单 Order cancelation by the management system-- MGT撤单 Limit maker order cancelation--limit-maker撤单 Order cancelation due to API timeout–api超时撤单 Order cancelation due to forced liquidation--强平撤单 Order cancelation due to ADL--adl撤单 Order cancelation due to delivery futures expiration--交割合约到期
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi#xiang-ying-shi-li)
响应示例
[上一页查询历史委托](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo)
[下一页查询用户当前的下单量限制](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-yong-hu-dang-qian-de-xia-dan-liang-xian-zhi)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi#xiang-ying-shi-li)
复制
GET https://api.sunx.io/sapi/v1/trade/order?contract_code=BTC-USDT&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
复制
{
"code": 200,
"data": {
"id": "1382748711814639616",
"side": "buy",
"type": "market",
"price": "0",
"volume": "1",
"state": "filled",
"profit": "0",
"contract_code": "BTC-USDT-250613",
"position_side": "long",
"price_match": null,
"order_id": 1382748711720767500,
"client_order_id": "1382748711720767488",
"margin_mode": "cross",
"lever_rate": 10,
"order_source": "api",
"reduce_only": false,
"time_in_force": "gtc",
"tp_trigger_price": null,
"tp_order_price": null,
"tp_type": null,
"tp_trigger_price_type": null,
"sl_trigger_price": null,
"sl_order_price": null,
"sl_type": null,
"sl_trigger_price_type": null,
"trade_avg_price": "798",
"trade_volume": "1",
"trade_turnover": "0.798",
"fee_currency": "USDT",
"fee": "-0.0004788",
"price_protect": false,
"contract_type": "this_week",
"created_time": "1749714583106",
"updated_time": "1749714583117",
"cancel_reason": null,
"self_match_prevent":"cancel_taker"
},
"message": null,
"success": true
}
---
# 查询当前委托 | 孙悟空
/sapi/v1/trade/order/opens
请求类型: GET
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用于查询合约当前未成交的委托单,若全部为否,则全量查询用户所有挂单,并且根据创建时间由早到晚进行排序。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
false
合约代码
margin\_mode
String
false
保证金模式
cross:全仓
order\_id
String
false
订单id
client\_order\_id
String
false
用户自定义订单ID
from
long
false
查询的起始id,默认从0开始
limit
Integer
false
分页页面大小,默认为10,最大为100。
direct
String
false
翻页方向,prev, next,默认next
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
id
String
true
查询id
contract\_code
String
true
合约代码
永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
side
String
true
买卖方向
buy:买 "sell":卖
position\_side
String
true
仓位方向
"long":多 "short":空 “both”:单向持仓
type
String
true
订单报价类型
market, limit, post\_only
price\_match
String
true
最优档位,和price互斥
opponent-对手价、"optimal\_5":最优5档,"optimal\_10":最优10档,"optimal\_20":最优20档
order\_id
String
true
订单id
client\_order\_id
String
true
用户自定义订单ID
margin\_mode
String
true
保证金模式
cross:全仓 ;
price
String
true
价格,仅当限价单的时候有效,市价无需输入。
volume
String
true
委托张数。
lever\_rate
Long
true
杠杆等级
state
String
true
订单状态
new, partially\_filled, filled, partially\_canceled, canceled,rejected
order\_source
String
true
订单来源
(system:系统、web:用户网页、api:用户API、m:用户M站、risk:风控系统、settlement:交割结算、ios:ios客户端、android:安卓客户端、windows:windows客户端、mac:mac客户端、trigger:计划委托触发、tpsl:止盈止损触发、ADL: adl订单)
reduce\_only
boolean
true
只减仓
time\_in\_force
String
true
枚举fok, ioc, gtc,非必填,默认是gtc
tp\_trigger\_price
String
true
止盈触发价格
tp\_order\_price
String
true
止盈委托价格(最优N档委托类型时无需填写价格)
tp\_type
String
true
止盈委托类型,不填默认为market: 市价,maket: 限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
tp\_trigger\_price\_type
String
false
止盈价格触发类型,默认是最新价
last":最新价,"mark":标记价格
sl\_trigger\_price
String
true
止损触发价格
sl\_order\_price
String
true
止损委托价格(最优N档委托类型时无需填写价格)
sl\_type
String
true
止损委托类型,不填默认为 市价,maket: 限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
sl\_trigger\_price\_type
String
true
止损价格触发类型,默认是最新价
"last":最新价,"market":标记价格
trade\_avg\_price
String
true
成交均价
trade\_volume
String
true
成交数量
trade\_turnover
String
true
成交总金额
fee\_currency
String
true
手续费币种,多个则使用","分隔
fee
String
true
总手续费(U)
price\_protect
boolean
true
价差保护,默认为false。仅当设置止盈/止损需要该参数。
false 或者 true
profit
String
true
平仓盈亏
contract\_type
String
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
created\_time
String
true
订单创建时间, UTC时间戳(MS)
updated\_time
String
true
订单更新时间, UTC时间戳(MS)
self\_match\_prevent
String
true
防自成交
cancel\_taker: 撤销taker单 cancel\_maker:撤销maker单 cancel\_both:撤销全部订单
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo#xiang-ying-shi-li)
响应示例
[上一页一键全平](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/yi-jian-quan-ping)
[下一页查询成交明细](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-dang-qian-wei-tuo#xiang-ying-shi-li)
复制
GET https://api.sunx.io/sapi/v1/trade/order/opens?margin_mode=cross&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"id": "1124147771",\
"contract_code": "BTC-USDT",\
"order_id": "1343541341268738048",\
"trade_id": "100000032538647",\
"side": "sell",\
"position_side": "short",\
"order_type": "1",\
"margin_mode": "cross",\
"type": "limit",\
"role": "TAKER",\
"trade_price": "31400",\
"trade_volume": "1",\
"trade_turnover": "31.4",\
"created_time": 1740366817564,\
"updated_time": 1740366817564,\
"order_source": "api",\
"fee_currency": "USDT",\
"trade_fee": "0.01884",\
"deduction_price": "",\
"profit": "0",\
"contract_type": "swap",\
"self_match_prevent":"cancel_taker"\
}\
],
"ts": 1740377316667
}
---
# 查询历史委托 | 孙悟空
/sapi/v1/trade/order/history
请求类型: GET
是否验签: 是
接口权限: 读取
限频: 每个account 3秒最多 144 次请求(交易接口3秒最多 72 次请求,查询接口3秒最多 72 次请求) (该account的所有币种和不同到期日的合约的所有私有接口共享该限制) 。
接口描述: 此接口用于查询历史委托的合约订单。
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo#qing-qiu-di-zhi)
请求地址
环境
地址
线上环境
[https://api.sunx.io](https://api.sunx.io/)
线上环境(aws客户首选)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo#qing-qiu-can-shu)
请求参数
参数
数据类型
是否必填
描述
取值范围
默认值
contract\_code
String
true
合约代码,必填项,查询永续合约和交割合约时,需使用指定合约代码
“BTC-USDT” “BTC-USDT-251103”...
margin\_mode
String
true
保证金模式 cross:全仓 ;
states
String
false
订单状态
可以查多个状态,使用逗号分隔。“filled“:”已成交”, ”partially\_canceled”:””部分成交已撤销, “canceled“:”已撤销”
type
String
false
订单类型
"market": 市价,"limit":限价,"post\_only":只做maker单
price\_match
String
false
最优档位
最优档位,opponent-对手价、"optimal\_5":最优5档,"optimal\_10":最优10档,"optimal\_20":最优20档
time\_in\_force
String
false
生效时间
start\_time
String
false
查询开始时间, 以数据按创建时间进行查询,UNIX时间戳,以毫秒为单位。
取值范围 \[((end-time) – 48h), (end-time)\] ,查询窗口最大为48小时,窗口平移范围为最近90天。 默认值 (now) – 48h
end\_time
String
false
查询结束时间, 以数据按创建时间进行查询,UNIX时间戳,以毫秒为单位。
取值范围 \[(present-90d), present\] ,查询窗口最大为48小时,窗口平移范围为最近90天。 默认值:now
from
Long
false
查询的起始id,默认从0开始
limit
Integer
false
分页页面大小,默认为10,最大为100。
direct
String
false
翻页方向
prev, next,默认next
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo#xiang-ying-can-shu)
响应参数
参数
数据类型
是否必填
描述
取值范围
id
String
true
查询id
contract\_code
String
true
合约代码
永续:"BTC-USDT"... ,交割:"BTC-USDT-210625"...
side
String
true
买卖方向
buy:买 "sell":卖
position\_side
String
true
仓位方向
"long":多 "short":空 “both”:单向持仓
type
String
true
订单类型;枚举
"market": 市价,"limit":限价, "post\_only":只挂单
price\_match
String
false
最优档位
opponent-对手价、"optimal\_5":最优5档,"optimal\_10":最优10档,"optimal\_20":最优20档
order\_id
String
true
订单id
client\_order\_id
String
true
用户自定义订单ID
margin\_mode
String
true
保证金模式
枚举 cross
price
String
true
委托价格
volume
String
true
委托数量
lever\_rate
Long
true
杠杆等级
state
String
true
订单状态
filled, partially\_canceled, canceled
order\_source
String
true
订单来源
system:系统、web:用户网页、api:用户API、m:用户M站、risk:风控系统、settlement:交割结算、ios:ios客户端、android:安卓客户端、windows:windows客户端、mac:mac客户端、trigger:计划委托触发、tpsl:止盈止损触发、ADL: adl订单)
reduce\_only
boolean
true
只减仓
False、True
time\_in\_force
String
true
枚举fok, ioc, gtc,非必填,默认是gtc
tp\_trigger\_price
String
true
止盈触发价格
tp\_order\_price
String
true
止盈委托价格(最优N档委托类型时无需填写价格)
tp\_type
String
true
止盈委托类型,不填默认为market: 市价,maket: 限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
tp\_trigger\_price\_type
String
false
止盈价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
sl\_trigger\_price
String
true
止损触发价格
sl\_order\_price
String
true
止损委托价格(最优N档委托类型时无需填写价格)
sl\_type
String
true
止损委托类型,不填默认为 市价,maket: 限价:limit ,最优5档: optimal\_5,最优10档:optimal\_10,最优20档:optimal\_20
sl\_trigger\_price\_type
String
false
止损价格触发类型,默认是最新价
"last":最新价,"mark":标记价格
trade\_avg\_price
String
true
成交均价
trade\_volume
String
true
成交数量
trade\_turnover
String
true
成交总金额
fee\_currency
String
true
手续费币种,多个则使用","分隔
fee
String
true
总手续费(U
price\_protect
boolean
false
价差保护,默认为false。仅当设置止盈/止损需要该参数
false 或者 true
profit
String
true
平仓盈亏(使用持仓均价计算,不包含仓位跨结算的已实现盈亏。)
contract\_type
String
true
合约类型
swap(永续)、this\_week(当周)、next\_week(次周)、quarter(当季)、next\_quarter(次季)
cancel\_reason
String
true
撤单原因
"Limit order cancelation by the client":"用户主动撤销普通限价订单","Order cancelation by system":"系统撤单","Market order circuit-breaker":"市价单熔断","Bankruptcy price of market order":"市价单破产价","Order cancelation due to no matching orders":"没有对手盘导致撤单"," Self trading prevention":"防自成交撤单","Number of maker orders matched with your taker orders exceeding limit":"成交笔数超过最大限制","Order cancelation due to API timeout":"API超时撤单"
created\_time
String
true
订单创建时间, UTC时间戳(MS)
updated\_time
String
true
订单更新时间, UTC时间戳(MS)
self\_match\_prevent
String
true
防自成交
cancel\_taker: 撤销taker单 cancel\_maker:撤销maker单 cancel\_both:撤销全部订单
备注: 下列行为,都属于"Order cancelation by system":"系统撤单"的范围。 FOK order cancelation-- fok撤单 IOC order cancelation-- ioc撤单 Order cancelation by the management system-- MGT撤单 Limit maker order cancelation--limit-maker撤单 Order cancelation due to API timeout–api超时撤单 Order cancelation due to forced liquidation--强平撤单 Order cancelation due to ADL--adl撤单 Order cancelation due to delivery futures expiration--交割合约到期
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo#qing-qiu-shi-li)
请求示例
###
[](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo#xiang-ying-shi-li)
响应示例
[上一页查询成交明细](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-cheng-jiao-ming-xi)
[下一页查询订单信息](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-ding-dan-xin-xi)
最后更新于23天前
* [请求地址](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo#qing-qiu-di-zhi)
* [请求参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo#qing-qiu-can-shu)
* [响应参数](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo#xiang-ying-can-shu)
* [请求示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo#qing-qiu-shi-li)
* [响应示例](https://sunx.gitbook.io/sunx-cn/kai-fa-zhe/rest/ding-dan-lei/cha-xun-li-shi-wei-tuo#xiang-ying-shi-li)
复制
GET https://api.sunx.io/sapi/v1/trade/order/history?contract_code=BTC-USDT&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
复制
{
"code": 200,
"message": "Success",
"data": [\
{\
"id": "1342444059268263936",\
"side": "buy",\
"type": "market",\
"price": "0",\
"volume": "6",\
"state": "filled",\
"profit": "-0.303999999999999996",\
"contract_code": "BTC-USDT",\
"position_side": "short",\
"price_match": null,\
"order_id": "1342444059150655488",\
"client_order_id": "1342444059150655488",\
"margin_mode": "cross",\
"lever_rate": 20,\
"order_source": "api",\
"reduce_only": true,\
"time_in_force": "gtc",\
"tp_trigger_price": "",\
"tp_order_price": "",\
"tp_type": null,\
"tp_trigger_price_type": null,\
"sl_trigger_price": "",\
"sl_order_price": "",\
"sl_type": null,\
"sl_trigger_price_type": null,\
"trade_avg_price": "31769.5",\
"trade_volume": "6",\
"trade_turnover": "190.617",\
"fee_currency": "USDT",\
"fee": "-0.1143702",\
"price_protect": false,\
"contract_type": "swap",\
"cancel_reason":"",\
"created_time": 1740108246827,\
"updated_time": 1740108246827,\
"self_match_prevent":"cancel_taker"\
},\
{\
"id": "1342152155381149696",\
"side": "buy",\
"type": "limit",\
"price": "4100.6",\
"volume": "6",\
"state": "canceled",\
"profit": "0",\
"contract_code": "BTC-USDT",\
"position_side": "both",\
"price_match": null,\
"order_id": "1342152155259641856",\
"client_order_id": "1342151603610202112",\
"margin_mode": "cross",\
"lever_rate": 20,\
"order_source": "tpsl",\
"reduce_only": true,\
"time_in_force": "gtc",\
"tp_trigger_price": "",\
"tp_order_price": "",\
"tp_type": null,\
"tp_trigger_price_type": null,\
"sl_trigger_price": "",\
"sl_order_price": "",\
"sl_type": null,\
"sl_trigger_price_type": null,\
"trade_avg_price": "0",\
"trade_volume": "0",\
"trade_turnover": "0",\
"fee_currency": "USDT",\
"fee": "0",\
"price_protect": false,\
"contract_type": "swap",\
"cancel_reason":"",\
"created_time": 1740108246827,\
"updated_time": 1740108246827,\
"self_match_prevent":"cancel_taker"\
},\
{\
"id": "1342151603528183808",\
"side": "sell",\
"type": "limit",\
"price": "4000.601",\
"volume": "6",\
"state": "filled",\
"profit": "0",\
"contract_code": "BTC-USDT",\
"position_side": "both",\
"price_match": null,\
"order_id": "1342151603389898752",\
"client_order_id": "1342151603389898752",\
"margin_mode": "cross",\
"lever_rate": 20,\
"order_source": "api",\
"reduce_only": false,\
"time_in_force": "gtc",\
"tp_trigger_price": "1.8",\
"tp_order_price": "1.8",\
"tp_type": "limit",\
"tp_trigger_price_type": "last",\
"sl_trigger_price": "4100.601",\
"sl_order_price": "4100.6",\
"sl_type": "limit",\
"sl_trigger_price_type": "last",\
"trade_avg_price": "31350.5",\
"trade_volume": "2",\
"trade_turnover": "62.701",\
"fee_currency": "USDT",\
"fee": "-0.0376206",\
"price_protect": false,\
"contract_type": "swap",\
"cancel_reason":"",\
"created_time": 1740108246827,\
"updated_time": 1740108246827,\
"self_match_prevent":"cancel_taker"\
}\
],
"ts": 1740108246827
}
---
# Introduction | SunX
**About** SunX
SunX is the first top-tier decentralized perpetual contract trading platform on the TRON blockchain, dedicated to providing users with an institutional-grade trading experience and ultimate asset security. By deeply integrating cross-chain liquidity, gas-free transactions, and intelligent risk control mechanisms, we are redefining efficient, convenient, and reliable DeFi derivatives trading.
**Core Advantages**
**·** Deep Aggregated Liquidity: Seamlessly integrated with top multi-chain liquidity sources, supporting instant execution of large-volume trades with near-zero slippage, delivering a CEX-like smooth trading experience.
· High-Speed Trading Performance: Millisecond-order matching and high-performance APIs, combined with intelligent on-chain routing technology, ensure rapid response and seamless operation, so you never miss a market opportunity.
· Zero Gas Fee Structure: An innovative hybrid model of off-chain execution and on-chain settlement allows users to trade without paying gas fees, significantly reducing the cost of frequent trading.
· Multi-Layered Intelligent Risk Control: Innovative anti-snipe mechanisms and multi-source oracle real-time pricing effectively avoid unexpected risks caused by abnormal market fluctuations, safeguarding your funds throughout the entire process.
[NextAccounts & Wallets](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets)
Last updated 28 days ago
---
# Accounts & Wallets | SunX
[](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#sunx-wallet-connection-guide)
SunX — Wallet Connection Guide
----------------------------------------------------------------------------------------------------------------------------------
This guide explains how to connect a wallet to SunX.
###
[](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#at-a-glance)
At a Glance
1) Open SunX → 2) Click “Connect Wallet” → 3) Choose one of the supported wallets → 4) Sign the message → 5) You’re connected.
###
[](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#prerequisites)
Prerequisites
\- Install one of the supported wallets (exact four options listed in the connect dialog). - Make sure the wallet extension/app is unlocked. - You do not need gas to connect; network fees apply only when you later submit on-chain transactions.
###
[](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#connect-your-wallet)
Connect Your Wallet
1\. Open the official [SunX](https://www.sunperp.com/)
app and locate the “Connect Wallet” button in the top-right header.

2\. Click “Connect Wallet”. A modal appears with exactly four wallet options as implemented by SunX:

3\. Select your wallet and follow the context-specific prompts:
• Browser Extension wallets (e.g., Tronlink): - Ensure the extension is enabled in your browser. - If prompted, approve the connection/authorization to SunX’s site. - A sign-in message will appear; review and sign to complete the connection.
• Mobile/Bridge-style wallets (e.g., if one of these options is a QR-based connector): - Click the option to display a QR code. - Open the wallet app on your phone and scan the QR. - Approve the connection in your mobile wallet, then sign the message.
4\. After signing, your wallet address will appear in the header. SunX does not require chain selection at this step.

###
[](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#about-the-sign-in-message)
About the Sign-In Message
SunX requests a one-time signature to verify wallet ownership and establish a session. This signature does not grant spending permissions and does not incur gas fees. Always read the message and confirm the domain before signing.
###
[](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#verify-connection-and-switch-accounts)
Verify Connection & Switch Accounts
\- Once connected, your address is displayed in the header.

\- To switch accounts, change the active account inside your wallet and click “Disconnect” → “Connect Wallet” again.

\- If a signature prompt re-appears, sign again to refresh the session.
###
[](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#troubleshooting)
Troubleshooting
\- Wallet not detected: Confirm the correct extension is installed and enabled. Close other wallet extensions that might conflict. - Connect modal does not appear: Refresh the page and ensure pop-up blockers are disabled. - Signature fails: Unlock your wallet, check system time, and try again. If the issue persists, disconnect and reconnect your wallet. - Wrong account connected: Switch the active account in your wallet, then reconnect in SunX.
[PreviousIntroduction](https://sunx.gitbook.io/sunx)
[NextGuide to Deposits and Withdrawals](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals)
Last updated 1 month ago
* [SunX — Wallet Connection Guide](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#sunx-wallet-connection-guide)
* [At a Glance](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#at-a-glance)
* [Prerequisites](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#prerequisites)
* [Connect Your Wallet](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#connect-your-wallet)
* [About the Sign-In Message](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#about-the-sign-in-message)
* [Verify Connection & Switch Accounts](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#verify-connection-and-switch-accounts)
* [Troubleshooting](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets#troubleshooting)
---
# Guide to Deposits and Withdrawals | SunX
[](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#sunx-deposit-and-withdrawal-guide)
SunX — Deposit & Withdrawal Guide
-------------------------------------------------------------------------------------------------------------------------------------------------------
This guide explains how to deposit and withdraw funds on SunX.
###
[](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#deposit)
Deposit
Before you can start trading on SunX, you need to deposit supported tokens into the platform. Follow the steps below carefully to ensure a smooth process.
####
[](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#step-1-connect-your-wallet)
Step 1: Connect Your Wallet
1\. Open the [SunX app](https://www.sunperp.com/)
and click \[Connect Wallet\] in the top-right header.

2\. Select one of all supported wallets and complete the connection flow. 3. Once connected, your wallet address will be displayed in the header.
####
[](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#step-2-approve-usdt-first-time-only)
Step 2: Approve USDT (First-Time Only)
1\. If this is your first deposit of USDT, you must approve the token for use on SunX. 2. In the \[Deposit\] modal, click \[Approve USDT\]. A transaction request will appear in your wallet.


3\. Carefully check the contract address before approving. The official SunX contract is: TEubMt2TNag5NN1JXVaeysUk8GNTTYmtVX 4. Confirm the approval transaction in your wallet.
 5. Wait until the approval transaction is confirmed on-chain. Once confirmed, you can proceed with deposits. \_Note: If you have already granted sufficient USDT allowance to this contract, this step will be skipped automatically.
####
[](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#step-3-deposit-funds)
Step 3: Deposit Funds
1\. After approval, return to the \[Deposit\] modal.

2\. Select the token (e.g., USDT) and enter the deposit amount. 3. Click \[Confirm Deposit\]. A transaction request will appear in your wallet.

4\. Review and sign the deposit transaction. 5. Wait for blockchain confirmation. Do not close or refresh the page during this step. 6. Once confirmed, your balance will be updated in the [\[Portfolio\]](https://www.sunperp.com/futures/portfolio/)
page.

7\. You can review completed deposits in the \[Detail → Deposit History\] section.

####
[](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#important-notes-for-deposits)
Important Notes for Deposits
\- Ensure you have enough native tokens in your wallet (e.g., TRX on TRON) to cover network gas fees. - Only approve the official contract address provided above. Approving unknown contracts may put your funds at risk. - Deposits are irreversible once confirmed on-chain. Always double-check token and amount before approving.
###
[](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#withdraw)
Withdraw
Withdrawals allow you to transfer funds from SunX back to your connected wallet.
1\. In the [SunX app](https://www.sunperp.com/)
, click the \[Withdraw\] button.

2\. Select the token and amount you wish to withdraw.

3\. A transfer request will appear in your wallet. Review carefully and approve the transaction.

4\. Wait for blockchain confirmation. The withdrawn amount will then appear in your wallet balance. 5. To review all past withdrawals, navigate to \[Detail → Withdrawal History\].

####
[](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#important-notes-for-withdrawals)
Important Notes for Withdrawals
\- Withdrawal requests that remain unconfirmed due to network congestion may require additional time.
###
[](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#sunx-platform-wide-withdrawal-limit)
SunX Platform-wide Withdrawal Limit
SunX enforces a single global withdrawal limit across the entire platform: - The maximum withdrawal amount for all users combined is capped at 2,000,000 USD per hour.
###
[](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#troubleshooting)
Troubleshooting
\- Deposit not showing: Ensure your transaction has been confirmed on-chain. Refresh the page or check \[Deposit History\]. - Withdrawal delayed: Network congestion may extend confirmation times. Check blockchain explorer for status. - Insufficient gas: Ensure your wallet has enough native tokens for gas fees. - Wrong token sent: Depositing unsupported tokens may result in permanent loss.
[PreviousAccounts & Wallets](https://sunx.gitbook.io/sunx/entry-level/accounts-and-wallets)
[NextSunX Online Q&A](https://sunx.gitbook.io/sunx/entry-level/sunx-online-q-and-a)
Last updated 1 month ago
* [SunX — Deposit & Withdrawal Guide](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#sunx-deposit-and-withdrawal-guide)
* [Deposit](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#deposit)
* [Withdraw](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#withdraw)
* [SunX Platform-wide Withdrawal Limit](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#sunx-platform-wide-withdrawal-limit)
* [Troubleshooting](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals#troubleshooting)
---
# Auto-Deleveraging (ADL) | SunX
1\. What is ADL?
Auto-Deleveraging (ADL) is a mechanism of forcibly liquidating positions to minimize the traders and the platform's overall risk, in the event of depletion or rapid drawdown of the insurance fund due to extreme market conditions or force majeure. A rapid drawback refers to the insurance fund falling from its peak by a preset threshold within 1, 2, 4, or 8 hours. The exact thresholds vary by trading pair and may be adjusted by the platform in response to market conditions and user protection principles.
2\. How does ADL work?
When ADL is triggered, the system selects positions for deleveraging based on their priority ranking instead of liquidations through the order book. Thus, after the execution, the counterparty positions will be reduced, and the funds from the closed positions will be added to their account balances.
Please note ADL execution prices may deviate from the specific contract's real-time market price. We strongly recommend monitoring the ADL Indicator (priority level signal) to avoid being selected as a counterparty.
3\. How is ADL priority determined?
ADL uses a ranking system based on both account (or position) risk levels and position profitability.
\[Cross Margin Mode\]
· Profitable position: Leveraged PnL = Position PnL percentage / Account margin ratio
· Losing position: Leverage PnL = Position PnL percentage \* Account margin ratio
Accounts with a higher PnL percentage and a lower margin ratio are more likely to be placed higher in the ADL queue.
4\. Risk Reminder and Inquiry
You can track your ADL priority level via the indicator:
· 5 bars lit: You are at the top of the queue, indicating very high risk.
· 1 bar lit: You are at the bottom of the queue, indicating low risk.
If an ADL event occurs, you will receive an SMS and email notification, including details of the reduced position and execution price. You can also view this record on the Order History page, where the order type is labeled as ADL.
[PreviousSunX Online Q&A](https://sunx.gitbook.io/sunx/entry-level/sunx-online-q-and-a)
[NextMark Price](https://sunx.gitbook.io/sunx/trade/mark-price)
Last updated 3 months ago
---
# SunX Online Q&A | SunX
SunX Online Q&A (Nov. 27, 2025)
**79、What are the eligibility requirements to claim rewards from the Airdrop for All event?**
Users who have registered on the Hyperliquid platform with an Arbitrum-chain address, connected it to SunX, and completed trades totaling at least 100 USDT are eligible to claim the airdrop reward.
**78、Regarding “zero-fee” trading in Trade to Earn, does that mean no fee is deducted?**
Trading fees are normally charged at the time of the transaction. However, when you claim your Trade to Earn rewards, you will receive a rebate of 107%–110% of the fees, effectively making it a zero-fee trade.
**77、Why do Maker orders get higher rewards in Trade to Earn?**
Since Maker orders provide liquidity to the platform, improving market depth and reducing slippage, SunX offers higher incentive rates — up to 110% — to reward this contribution.
**76、Will the fees collected from Trade to Earn be used to buy back and burn $SUN?**
Yes. The platform uses all collected fees to repurchase and burn $SUN. The amount repurchased daily will be publicly disclosed, and cumulative repurchase data can be viewed on the Trade to Earn page. The actual burn of repurchased tokens occurs quarterly.
**75、Do I need to register first before my trades count toward Trade to Earn?**
Yes. You must register for the Trade to Earn event first, and then trade BTC, ETH or SUN. As long as your trading volume reaches the requirement before the end of the event, you will receive the corresponding trading rewards.
SunX Online Q&A (Nov. 25, 2025)
**74、What is "Trade to Earn"?** "Trade to Earn" is a limited-time incentive event launched by SunX. When you trade the designated futures pairs during the event, you not only get a sweet 100% discount on trading fees but also earn extra SUN tokens. Basically, the more you trade, the more you get!
**73、How are "Trade to Earn" rewards calculated?** Reward = Trading fee × Weight factor. Makers get a weight factor of 110%, and Takers get 107%. So, if you pay 100 USDT in trading fee, a Maker order earns you 110 USDT worth of SUN tokens, and a Taker order gets you 107 USDT in SUN.
**72、Which cryptocurrencies are eligible for "Trade to Earn"?** Currently, you may trade BTCUSDT, ETHUSDT, or SUNUSDT to win rewards from the "Trade to Earn" event.
**71、How do I participate in "Trade to Earn"?** You just need to register for the event on the "Trade to Earn" page, and then start trading the designated pairs on SunX. Please note that the daily and hourly prize pools have caps. If a phase's prize pools are being completely claimed, you won't get any more rewards until the next phase. You can always check the prize pool progress on the event page.
**70、If I don't claim my USDT staking rewards for 2-3 days, will the earnings disappear?** Your earnings won't disappear! You may choose to claim them daily, or let them build up and collect them all at once after a few days. But, we actually recommend claiming daily. That way, your earnings can start compounding immediately, helping you maximize your yields!
SunPerp Online Q&A (Nov. 12, 2025)
**69、Why can't I see my previous trading history?**
Currently, SunPerp only supports viewing trading records from the last 30 days.
**68、I use an OKX Wallet. When I make approvals, do those fees go to OKX or to SunPerp?**
Approval is an on-chain transaction, so the related fees are collected by the corresponding public blockchain, not by the wallet service provider or SunPerp. For instance, if you use a TRON wallet, the fee is collected by the TRON network; if you use an Ethereum wallet, the fee is collected by the Ethereum network.
**67、If I use Energy for the first approval and make a deposit of 100 USDT, do I get a 10 TRX reward?**
If you complete your first approval using Energy and deposit 100 USDT or more, you will receive a reward of 3 TRX, not 10.
**66、I was charged a 10.36 TRX fee when I made a deposit. Who collected that fee?**
That specific charge is the fee required for the on-chain transaction, and it is collected directly by the TRON network. If you deposit 100 USDT or more after your first approval, SunPerp will rebate you 10 TRX.
**65、How do I withdraw funds from SunPerp?**
After connecting your wallet, simply click the Deposit button in the top right corner of our homepage. Once you enter that page, you can select Withdraw to continue.
SunX Online Q&A (Nov. 16, 2025)
**64\. I’m a beginner. Which wallet should I use to access** SunX **? Ideally, I’d like one that works on both mobile and desktop.**
If you are new to decentralized wallets, we recommend using TronLink, the official wallet of the TRON network. It offers the best compatibility and user experience. You can download it from tronlink.org, and it supports both mobile and desktop synchronization.
**63\. If I deposit using a non-TRON chain wallet address, how can I claim SUN tokens?**
Users who deposit via non-TRON chain wallets can still claim the SUN Welcome Bonus. However, since SUN tokens are currently not issued on other public blockchains, withdrawals to non-TRON wallets are not supported at this time. We are designing a cross-chain solution, so please stay tuned for future announcements.
**62\. Are referral rewards distributed automatically or do I need to claim them manually?**
Fee rebate rewards will be automatically distributed to your account on T+1 day, with no action required. However, referral rewards from the Welcome Campaign must be claimed manually on the “Welcome Fiesta” page.
**61\. Does** SunX **have its own TGE narrative?**
At present, the SunX platform has no plans to launch a new token (TGE). The platform’s official token remains $SUN.
**60\. Has the APY for USDT staking changed to 7%?**
As the platform’s total funds surpassed $77 million, the USDT staking APY has been adjusted to a tiered structure: The base yield is 7%; For accounts with a balance ≥ 10,000 USDT and a daily trading volume ≥ 30% of total funds, an extra 3% bonus yield applies, bringing the total APY to up to 10%. Compared with the industry average, APY offered by SunX remains significantly competitive.
SunX Online Q&A (Nov. 5, 2025)
**59\. If I don’t complete KYC on the** SunX **platform, how can I exchange USDT into fiat currency?**
As a decentralized perpetual futures trading platform, SunX does not provide fiat currency exchange services. You may transfer USDT to the HTX Exchange and then convert it to fiat through P2P trading.
**58\. What are the official Telegram (TG) accounts of** SunX **?**
The official SunX Telegram accounts are: @SunX\_Vivian, @mysticalwave, @sayonaraudin, @SunXbd, @ILoveyouEveryUniverss, @Nickky\_77, @Web3Donny, @PlusJhon, @jakolbhing, @Gdongdong, @nfree1125, @xiaoshuai\_945, @alyx\_SunX, @Jevon\_SunX, and @joy\_SunX. All of the above are officially verified community administrators or customer service representatives of SunX. We recommend contacting official public channels first. If private messaging is necessary, please verify the identity through these certified accounts to prevent impersonation scams.
**57\. I’ve added the wallet extension via Google Chrome, but it shows “wallet not detected". Do I need to log in first?**
Currently, SunX supports six major wallets: MetaMask, Binance Wallet, OKX Wallet, Bitget Wallet, TokenPocket, and TronLink. Please make sure your wallet was downloaded from official sources. Before connecting, ensure that you are logged in and the wallet is unlocked. If it still shows “wallet not detected", try restarting your browser or checking if the wallet extension is properly enabled.
**56\. When did SUN token buyback and burn start?**
The SUN token buyback and burn mechanism has been in continuous operation since March 2022, with a total of 648,535,242.90 $SUN burned to date. The most recent (48th) burn saw 2,060,843.918 $SUN destroyed, including: 362,655,328.09 $SUN repurchased and burned through SunSwap V2 revenue; 285,879,914.81 $SUN repurchased and burned through SunPump revenue. A detailed plan for allocating SunX platform revenue toward SUN token buyback and burn is currently being formulated. Please follow official announcements for updates.
SunX Online Q&A (Oct. 29, 2025)
**55\. I applied for participation in the $100M "Sail Together" Initiative, why haven’t I received a reply yet?**
We apologize for the delay. Due to numerous applications, reviews are still in progress. Please patiently wait for the results.
**54\. What should I do if I get an “insufficient TRX” message when depositing?**
SunX is a decentralized on-chain perpetual trading platform. All deposits are processed on-chain and require a small amount of gas. If you receive a notice about insufficient TRX, please transfer some TRX to your wallet to cover daily network transaction fees.
**53\. How can I upgrade my VIP level?**
VIP levels are determined by your cumulative trading volume in the past 30 days—the higher your trading volume, the higher your level. For example, when your trading volume reaches $500 million, you will be upgraded to SVIP4, enjoying a Taker fee as low as 0.015%. You can check the specific requirements and fee standards for each VIP level anytime by clicking “Fee Rates” on the right side of the trading page.
**52\. What are** SunX**’s current oracle and insurance fund policies?**
SunX uses multi-exchange price feeds as oracle data sources to ensure stable pricing. The insurance fund feature is under development and will adopt a mechanism similar to mainstream trading platforms. Please stay tuned for future announcements.
SunX Online Q&A (Oct. 27, 2025)
**51\. I submitted an application to participate in the “Sail Together" Initiative and when will the compensation be credited?**
Once you receive a confirmation email after submitting your application, your submission is successful. The subsidy will be credited to your SunX Subsidy Account in one payment. You can gradually unlock the USDT subsidy through trading, with no unlocking time limit. Please refer to the platform announcement for details.
**50\. Is there a SUN reward for depositing BNB?**
Currently, there’s no reward for depositing BNB. However, users who make their first deposit of 100 USDT or more can receive 70 SUN tokens as a reward.
**49\. What are the official websites of** SunX**?**
SunX currently has three official domains: sunwukong.io, swk.io, and SunX.io. Chinese users are recommended to visit sunwukong.io or swk.io, while SunX.io is suggested for overseas users.
**48\. Will there be a Multi-Assets Collateral mode in the future?**
At the moment, the platform only supports USDT as collateral. The Multi-Assets Collateral function is in the pipeline. Please follow official updates for launch details.
**47\. After I deposit USDT into** SunX**, could it be frozen or restricted due to risk control, regulations, or system issues?**
SunX uses an on-chain decentralized staking mechanism. Your USDT always remains under your personal wallet’s control. The platform will never freeze or restrict your assets.
SunX Online Q&A (Oct. 23, 2025)
**46\. Which wallet offers the best compatibility? Must I use TronLink?**
SunX supports multiple mainstream wallets including MetaMask, Binance Wallet, OKX Wallet, Bitget Wallet, TokenPocket, and TronLink. All six wallets could function smoothly on the SunX platform, and you can freely choose according to your preference—it’s not limited to TronLink.
**45\. Do I need to pay gas fees for every trade on** SunX **?**
No. Futures trading on the SunX platform does not require gas fees. You only need to pay the applicable trading fee according to your order type.
**44\. What are the trading fees?**
Currently, maker and taker fees for opening and closing positions are 0.015% and 0.04%, respectively. Additionally, from 03:00 (UTC) on October 21 to 16:00 (UTC) on November 3, all maker orders enjoy 0 trading fees, with no limit on order amount or trading volume.
**43\. Is staking USDT risk-free?**
USDT staking on SunX provides risk-free yield by design. However, systemic risks such as USDT price volatility or network attacks cannot be completely ruled out.
**42\. Are maker orders excluded from the trading leaderboard?**
Yes. The leaderboard only counts trades that generate fees (i.e., fees > 0). During the zero fee promotion, maker orders will not be included in the ranking.
SunX Online Q&A (Oct. 22, 2025)
**41\. When does the daily trading leaderboard close?**
The leaderboard’s daily calculation cycle runs from 00:00 to 23:59 (UTC+8).
**40\. Can I earn 12% interest by depositing USDT from the BSC chain?**
Yes. No matter whether you deposit USDT from TRON, Ethereum, BSC, or Arbitrum, you can enjoy 12% APY on the SunX platform.
**39\. How can I withdraw SUN tokens on non-TRON chains?**
SUN is the native token of the TRON network, and withdrawals are only supported by wallets that support the TRON network. Other chains do not support SUN withdrawals.
**38\. Is the 12% annual yield paid in USDT or SUN? And do I need to keep my funds on the platform?**
The 12% APY is paid in USDT. To earn it, you need to deposit USDT to the SunX platform. However, your assets remain under your personal control, can be withdrawn anytime, and do not affect futures trading.
**37\. I heard that staking more than 50,000 USDT can qualify for 20% APY. Is that true?**
Yes. If your staking amount exceeds 50,000 USDT, you can contact your dedicated BD manager to apply for a higher yield. The exact rate and amount will be determined based on individual arrangements.
SunX Online Q&A (Oct. 21, 2025)
**36\. I saw there’s a 10 TRX rebate for deposits. If I use Energy instead of burning TRX, can I still get the rebate?**
1. When your total deposits hit 100 USDT on Sun,X you'll receive a 100% rebate (i.e. 10 TRX) on your first TRON approval gas fee. The gas fee will be deducted on-chain first and reimbursed by the platform according to the following schedule:
2. Users who use energy proxy to pay the authentication fee can enjoy a limited-time offer of a 3 TRX rebate.
**35\. Are there any trading fee promotions?**
Yes. From October 21 to November 3, SunX offers zero fees for all maker orders—no limit on order amount or trading volume. All maker trades charge no fees.
**34\. Do I need a VPN to access the web version on desktop?**
You can access sunwukong.io and connect your wallet without using a VPN. However, if you need to install wallet extensions from the Google Chrome Web Store, you may need a VPN to access the store.
**33\. On which exchanges can I buy SUN now? And what’s the official contract address?**
SUN is currently listed on over 60 exchanges. The official TRON contract address is: TSSMHYeV2uE9qYH95DqyoCuNCzEL1NvU3S
**32\. Does** SunX **support all private-key wallets? Is it safe to connect a wallet that holds USDT? Are there any protective measures for users when transferring USDT via the wallet?**
Currently, SunX supports TRON, Ethereum, BSC, and Arbitrum networks and integrates six major wallets. More chains and wallets are being added. Your assets always remain in your personal wallet—the platform does not custody funds. Please keep your private key and seed phrase safe and authorize smart contracts with caution. SunX will be fully responsible for any asset loss caused by the platform.
SunX Online Q&A (Oct. 20, 2025)
**31\. My account was mistakenly flagged by the risk control system. How can I lift the restriction?**
Please send your wallet address and relevant screenshots of the risk-control notification to support@SunX.io. We will verify and resolve your problem as soon as we receive your email.
**30\. What’s the maximum leverage available on** SunX**?**
SunX currently supports up to 100× leverage.
**29\. Trading fees are paid in TRX, so what’s the purpose of the SUN token?**
We are designing the overall utility plan for SUN, which may include mechanisms such as fee-based SUN burning in the future. Please stay tuned for upcoming official announcements.
**28\. How can I participate in the “Sail Together” initiative**
During the black-swan event on October 11, any user who experienced a liquidation of ≥ $50 on any DEX is eligible to apply for participation in SunX’s “Sail Together” initiative. Please visit SunX’s official X @sunwukong\_DEX and submit your information through the application form in the pinned post.
**27\. Does staking compound automatically every day?**
Automatic compounding is not yet supported. You need to manually claim your daily staking rewards; after claiming, those rewards will be added to your balance, enabling compounding.
SunX Online Q&A (Oct. 17, 2025)
**26\. How can I connect my own wallet?**
We recommend using Google Chrome to visit the official website (sunwukong.io). Install a supported wallet extension (such as TronLink) from the browser’s extension panel, log in the wallet, then return to the page to connect. SunX currently supports four public blockchains — TRON, Ethereum, BSC, and Arbitrum — and is compatible with six leading wallets. If you haven’t used a wallet before, please visit tronlink.org to install the plugin, register a personal wallet, and then connect it to SunX to start trading. (Note: A VPN connection is required.)
**25\. What protection does staking offer? If I stake $400,000 and get hacked, will I be compensated?**
Staking on SunX is a fully on-chain, decentralized operation. Your assets always remain in your personal wallet, and the platform cannot control or move them. We only integrate security-audited smart contracts and continuously monitor them to reduce risks. However, as blockchain systems inherently involve unpredictable risks (e.g., contract vulnerabilities), please safeguard your wallet and be careful when granting authorizations. If asset loss occurs due to platform-caused reasons, SunX will take full responsibility.
**24\. Is the $100 million subsidy real, or just a trial bonus?**
The $100M "Sail Together" Initiative is genuine and effective, and all subsidies are distributed in USDT. Between 00:00 (UTC) on October 10 and 23:59 (UTC) on October 11, any user who suffered a liquidation of more than $50 on any DEX can apply for a subsidy of up to $5,000. Once approved, you can unlock your rewards through trading on SunX — the more you trade, the more you unlock. Please refer to future announcements for detailed unlock ratios. The registration is now open — apply now!
**23\. How can I set TP/SL when placing orders?**
Currently, TP/SL cannot be set when placing an order. You need to first open a position, then go to the Holding page to set TP/SL for that position.
SunX Online Q&A (Oct. 16, 2025)
**22\. Does depositing via the OKX Wallet offer a gas fee rebate?**
Yes. As long as you use a TRON-compatible wallet (including OKX Wallet), upon your first authorization and deposit of at least $100, the TRX gas fee paid during authorization will be fully refunded to your wallet. When connecting your wallet, you could select the TRON network to view the list of supported wallets.
**21\. I deposited USDT on October 14. When will I start receiving staking rewards?**
Reward distribution follows these rules: SunX takes a daily snapshot at 00:00 (UTC+8) of the previous day’s USDT balance, and distributes the corresponding rewards on T+1 day at 17:00 (UTC+8). For example, if you deposit on October 14, a snapshot will be taken at 00:00 (UTC+8) on October 15, and rewards will be credited at 17:00 (UTC+8) on October 16.
**20\. Is there a cap on the 12% APY?**
Currently, there is no cap. SunX welcomes all on-chain users to participate and enjoy high returns. Any future adjustments will be announced officially; please refer to the Staking page for the latest information.
**19\. Is the APY fixed or dynamic?**
The 12% APY is fixed, with no amount or reward limits, so you can participate with confidence.
SunX Online Q&A (Oct. 15, 2025)
**18\. What should I do if “No wallet yet” appears when connecting?**
Please ensure that the correct wallet plugin (e.g., TronLink) is installed in your browser. If it is installed but can not be detected, try clearing browser cache and refreshing the page before reconnecting.
**17\. What does “100% gas fee rebate” mean?**
When you first connect a TRON wallet and grant authorization, you need to pay a gas fee (deducted in TRX). For first-time deposits exceeding 100 USDT, SunX will fully refund (100%) that fee to your authorized wallet. Specifically, users who authorized between Sept 17 – Sept 30 will receive refunds on Oct 15 – 17, and those who authorized between Oct 1 – 15 will receive refunds on Oct 31 – Nov 2.
**16\. Why can’t I find a registration page?**
SunX requires no registration. You can start trading simply by connecting your decentralized wallet (e.g., TronLink). If you haven’t installed one yet, please visit tronlink.org, install the plugin, create a wallet, and then connect to SunX.
**15\. Are there any current reward campaigns on** SunX**?**
Yes. SunX is currently offering several major promotions, including: Zero gas fee for first-time authorized deposits of 100 USDT or more; 12% APY on USDT deposits; Earn up to 1,500 SUN tokens per day by inviting friends. Welcome to visit sunwukong.io for details.
SunX Online Q&A (Oct. 14, 2025)
**14\. How can I participate in the referral bonus program?**
All SunX users can participate in the referral bonus program. Here’s how: Visit sunwukong.ioa on a desktop browser, connect your wallet, then click “Invite Friends” on the top menu and share the unique referral link with your friends. Once your friends connect their wallets through that link, a referral relationship is established.
**13\. How can I transfer my funds from HTX to** SunX**?**
SunX does not custody user assets. Simply connect your personal decentralized wallet to start trading. Steps: Install TronLink, transfer your assets (USDT, TRX, SUN, etc.) from HTX to TronLink, then connect the wallet to SunX to begin trading.
**12\. What are the requirements for listing a token on** SunX**?**
We welcome all high-quality projects to collaborate with us. For listing inquiries, please contact official customer service directly for further communication.
**11\. Does** SunX **have a development roadmap?**
Thank you for your interest in SunX! At 12:00 (UTC) on October 16, Justin Sun will discuss the development plan of the platform via the official X Space. You are warmly invited to join the session.
SunX Online Q&A (Oct. 13, 2025)
**10\. Are referral rewards paid in USDT or platform tokens, and are they distributed instantly?**
Referral rewards are distributed in USDT, and credited to your account on the following day.
**9\. Where can I download the** SunX **trading platform?**
SunX requires no download. PC users can trade directly via the official website sunwukong.io. The App is under development and will be released soon, and we will notify everyone as soon as it’s launched.
**8\. For staking, do I just need USDT in my account? Are rewards offered for other tokens too?**
Yes. As long as your SunX account holds USDT, you can participate in staking — no lock-up or freeze required, and it won’t affect futures trading. Currently, the 12% APY is available for USDT only, but more popular tokens may be supported later.
**7\. Is SUN the core token of** SunX**?**
Yes. SUN is SunX’s core token, and the platform has no plans to issue new tokens.
**6\. Why can’t I set TP/SL?**
After opening a position, you can go to the Holding page to set TP/SL manually.
SunX Online Q&A (Oct. 11, 2025)
**5\. What Is** SunX**?**
SunX is the first perpetual futures DEX on the TRON network.
**4\. How can I download the** SunX **on the mobile or PC?**
The app is currently in active development. For now, you can trade directly via the official website sunwukong.io on desktop.
**3\. Will spot trading be available in the future?**
Spot trading is under consideration. Please follow official announcements for updates.
**2\. Hello** SunX**, how can mainland users register?**
SunX requires no registration — global users can connect through their decentralized wallets. (A VPN may be required when connecting your wallet depending on your network restrictions.)
**1\. Will** SunX **issue new tokens? Which one is the platform token?**
SunX will not issue new tokens; its platform token is $SUN.
[PreviousGuide to Deposits and Withdrawals](https://sunx.gitbook.io/sunx/entry-level/guide-to-deposits-and-withdrawals)
[NextAuto-Deleveraging (ADL)](https://sunx.gitbook.io/sunx/trade/auto-deleveraging-adl)
Last updated 1 month ago
---
# Order Type | SunX
Perpetual futures trading supports six order types: Limit Order, Market Order, Trigger Order, Post-Only, Trailing Order, and TWAP (Time-Weighted Average Price) Order.
1\. Limit Order
A limit order allows you to place a buy or sell order at a specified price or better. Execution is not guaranteed and only occurs if the market price reaches the preset price.
· Buy Limit Order: Executes at the preset price or lower.
· Sell Limit Order: Executes at the preset price or higher.
2\. Market Order
A market order is executed immediately at the best available market price.
· Only the futures contract type and amount are required; execution price depends on order book liquidity.
· Execution is guaranteed, but the order price cannot be specified.
3\. Trigger Order
A trigger order allows you to preset a trigger price, order price, and amount. Once the last traded price reaches the trigger price, the system automatically places the order with preset parameters.
· Supports both limit and market order types, following existing trading rules.
· Your assets will not be frozen until your trigger order is triggered.
· Trigger failure may come from price limits, insufficient balance, or system issues.
· Execution may fail even after your order is triggered due to market fluctuations.
o A limit order is placed at the preset price with execution subject to market conditions.
o A market order is executed at the current market price with execution subject to liquidity.
4\. Post-Only
A Post-Only order will not be executed immediately after being placed.
· Post-Only orders will be automatically canceled, if they match immediately with existing ones in the market.
· These orders ensure you always act as a maker (liquidity provider).
5\. Trailing stop
A trailing stop order allows you to set a stop price that follows the market as it moves in your favor. If the price reverses by a set percentage, it triggers a market order.
· Requires setting a trigger price and a callback rate. A limit order will be placed at the preset price after the conditions are reached.
· Use Cases: Buy on a rebound after a price drop; Sell on a pullback after a price rally.
6\. Time-Weighted Average Price (TWAP)
A TWAP order splits a large order into smaller portions over a set period, helping reduce market impact and improve execution price stability.
· Ideal for large orders, smooth entry/exit, or reducing timing risk.
· Parameters:
o Total Amount: Total contracts to buy or sell.
o Order Type: Limit order (preset price) or market order (best available market price).
o Order Splitting Rules:
§ By number of slices (e.g., 20)
§ By fixed single order size (e.g., 2 contracts per order)
o Interval: Time difference between two slices (e.g., 30 seconds, 1 minute).
o Validity Period: Total strategy duration or until all orders are filled.
[PreviousMark Price](https://sunx.gitbook.io/sunx/trade/mark-price)
[NextRisk Reminder](https://sunx.gitbook.io/sunx/trade/risk-reminder)
Last updated 3 months ago
---
# Mark Price | SunX
I. What is the Mark Price?
The contract mark price is a calculated, theoretical fair value price. It is not the real-time trading price you see on the exchange's order book.
Its core purpose is to accurately reflect the true market value of the underlying asset as much as possible, avoiding price abnormalities caused by insufficient liquidity or market manipulation on a single exchange.
Market Price: The actual price at which you open and close positions, determined by the latest trades on the exchange's order book. It is highly volatile.
Mark Price: The price used by the system to record your account's performance, calculating whether your position is profitable or loss-making and whether it will be liquidated. It is relatively smooth and fair.
II. How is the Mark Price Calculated?
The mark price is not arbitrarily set; it follows a universal calculation method, typically referencing two key factors:
(1) Spot Index Price
This serves as the foundation of the mark price. The system selects spot prices from several globally recognized, highly liquid, and trustworthy major exchanges.
(2) Funding Rate (Primarily for Perpetual Contracts)
Perpetual contracts have no expiration date. To ensure the contract price closely tracks the spot price, a "funding rate" mechanism is designed.
When market sentiment is bullish, long positions pay funding fees to short positions.
When market sentiment is bearish, short positions pay funding fees to long positions.
The calculation of the mark price incorporates the expectation of the funding rate, allowing it to predict the impact of funding rates on the contract price and thus more accurately anchor to the spot index price.
(3) Mark Price = Median (Funding Rate Basis Fair Price, Depth-Weighted Fair Price, EMA Latest Price)
If one of the three prices is excluded from the calculation (switch turned off), and the remaining two prices are denoted as a and b, then:
Mark Price = Median (Price a, Price b) = (Price a + Price b) / 2
If two of the three prices are excluded from the calculation (switch turned off), and the remaining price is denoted as x, then:
Mark Price = Price x
III. The Core Role of the Mark Price
The design of the mark price primarily serves risk control, with its key functions reflected in the following three aspects:
Preventing Malicious Liquidations
This is the most critical and important role of the mark price.
Problem: Without the mark price, the platform would use only the market price to calculate profits, losses, and liquidations. In a smaller exchange with poor liquidity, a large trader ("whale") could use a small amount of capital to suddenly crash or pump the market, causing extreme volatility in the market price and forcing the liquidation of大量 high-leverage users' positions. The price would then quickly return to normal, allowing the manipulator to profit. This behavior is known as "liquidation hunting" or "liquidation attack."
Solution: Using the mark price as the trigger standard for liquidations. Since the mark price is based on spot prices from multiple major exchanges, it is nearly impossible to manipulate by a single entity. It is extremely difficult for a manipulator to simultaneously manipulate spot prices across all major exchanges. This greatly protects ordinary traders and ensures the fairness of liquidations.
Fair Calculation of Unrealized Profit and Loss
Whether your position is profitable or loss-making should not fluctuate drastically due to temporary price abnormalities on a single exchange. The mark price provides a stable and fair benchmark for calculating your floating profits and losses.
Your unrealized P&L = (Mark Price - Your Average Entry Price) \* Contract Quantity
This calculation better reflects the true market value of your position rather than short-term market noise.
Serving as the Benchmark for Triggering Liquidations
Your margin ratio and liquidation price are calculated based on the mark price, not the market price.
Liquidation is only triggered when the mark price reaches your liquidation line.
This means that even if the market price on your exchange suddenly plummets, as long as the spot prices on global major exchanges (i.e., the mark price) have not fallen to your liquidation line, your position will not be liquidated.
[PreviousAuto-Deleveraging (ADL)](https://sunx.gitbook.io/sunx/trade/auto-deleveraging-adl)
[NextOrder Type](https://sunx.gitbook.io/sunx/trade/order-type)
Last updated 3 months ago
---
# Forced Liquidation and Prices | SunX
I. Price Types
1\. Last Price
The last traded price of a futures contract, used in the calculation of realized PnL.
2\. Mark Price
A reference price calculated from the index price (based on a weighted average from multiple spot exchanges) and the funding rate. It is used to calculate unrealized PnL and to trigger liquidations.
a. Risk levels and maintenance margin ratios are dynamically changed based on the liquidation factor. Larger positions require a higher margin and have lower available leverage.
II. Forced Liquidation Trigger
Forced liquidation is triggered when the margin ratio ≥100% to prevent further losses.
Margin Formula:
· Initial margin = Face value per contract \* Position size / Average entry price / Leverage
· Maintenance margin = Average entry price \* Contract count \* Face value per contract / Leverage
How to Avoid Forced Liquidation:
When your risk ratio approaches 100%, you can reduce liquidation risk by adding margin to your account or reducing your position size.
III. Forced Liquidation Price
Forced liquidation occurs when the mark price reaches the liquidation threshold. Monitoring the gap between the mark price and the forced liquidation price is essential to avoid unexpected liquidation.
· In cross margin mode, long and short positions of the same contract share the same forced liquidation price.
IV. Forced Liquidation Process
1\. When your margin ratio is ≥100%, the system automatically triggers forced liquidation.
2\. All open (unfilled) orders in your account are immediately canceled.
3\. Depending on position size and risk ratio, the system may apply partial liquidation to reduce exposure before resorting to full liquidation.
V. Notes
· Position Size and Liquidation Type
o Smaller positions are more likely to be liquidated in full due to the limited margin buffer.
o Larger positions follow a tiered margin system, where liquidation is more gradual and risk control is more flexible.
· Suggestion
It is recommended to manually close positions before reaching the maintenance margin threshold, to avoid extra fees associated with forced liquidation.
· Negative Balance
If your account ends up with a negative balance after liquidation, you must deposit funds to restore the balance to positive.
[PreviousRisk Reminder](https://sunx.gitbook.io/sunx/trade/risk-reminder)
[NextTrading Fees](https://sunx.gitbook.io/sunx/trade/trading-fees)
Last updated 3 months ago
---
# Trading Fees | SunX
When you perform trades, SunX charges a fee (in USDT) on both opening and closing positions, which is factored into the realized profit and loss (PnL).
For example, in BTCUSDT perpetual futures trading, all fees are charged in USDT. These trading fees (or rebates for makers) are not frozen at the time of order placement; they are only deducted after execution and included in the realized PnL.
Formula: Trading fee = Number of executed contracts \* Face value per contract \* Execution price \* Trading fee rate
USDT-Margined Perpetual Futures Fee Rates:
Fee Rates to Open: Maker - 0.02%; Taker - 0.06%
Fee Rates to Close: Maker - 0.02%; Taker - 0.06%
Example 1: User A opens a long position of 200 conts (face value per cont: 0.001 BTC) in BTCUSDT perpetual futures at a price of 5,000 USDT, with the order filled as a taker. As the price rises after a few days, the user closes their position by placing a market order to sell all 200 conts at 6,000 USDT, with the order fully filled. Therefore:
Opening fee: 200 \* 0.001 \* 5,000 \* 0.06% = 0.6 USDT
Closing fee: 200 \* 0.001 \* 6,000 \* 0.02% = 0.24 USDT
Example 2: User B opens a long position of 200 conts (face value per cont: 0.01 ETH) in ETHUSDT perpetual futures at a price of 400 USDT, with the order filled as a taker. As the price rises after a few days, the user closes their position by placing a market order to sell all 200 conts at 480 USDT, with the order fully filled. Therefore:
Opening fee: 200 \* 0.001 \* 400 \* 0.06% = 0.48 USDT
Closing fee: 200 \* 0.001 \* 480 \* 0.02% = 0.192 USDT
Notes:
1\. The fee rates above are for illustration only. Please refer to your actual fee tier in the Fee Rates.
2\. Maker orders are limit orders added to the order book and pending execution, providing liquidity.
3\. When another user's open order executes against your pending order, you'll pay a maker fee.
4\. Taker orders are the limit or market orders that match immediately with existing orders in the book.
5\. When your pending order matches another user's open order, you need to pay a taker fee.
6\. A negative fee rate means you are not charged a fee; instead, you receive a rebate on the trade.
[PreviousForced Liquidation and Prices](https://sunx.gitbook.io/sunx/trade/forced-liquidation-and-prices)
[NextTrading Account and Margin](https://sunx.gitbook.io/sunx/trade/trading-account-and-margin)
Last updated 1 month ago
---
# Trading Account and Margin | SunX
1\. Margin Mode and Trading Account
Cross Margin: SunX currently supports the cross margin mode, which means all positions within your account share the same margin balance.
Isolated Margin: SunX temporarily does not support the isolated margin mode.
2\. Liquidation
For details on the liquidation process, please refer to the Liquidation section.
3\. Margin
In the futures market, you do not need to pay the full notional value of a trade. Instead, you just need to deposit a margin, a fraction of the contract value, as collateral to open and maintain positions. After a position is opened, the required margin is subject to change based on the last traded price.
Cross Margin Mode
SunX supports USDT as the primary margin asset. In cross margin mode, all positions under the same account, whether perpetual or delivery futures contracts, share the same account equity (i.e., USDT assets). Profits, losses, used margin, and margin ratio are calculated collectively.
Example: If User B holds a BTCUSDT perpetual position, an ETHUSDT perpetual position, and a BTCUSDT weekly delivery position in the cross margin mode, the USDT balance in the user's account backs all three positions, whose margin ratio will be calculated jointly. If the margin ratio exceeds 100%, the user faces potential liquidation on all three of their positions.
Note: Currently, SunX does not support the isolated margin mode. Please stay tuned for updates.
Margin Formula:
Position margin = Position value / Leverage
Example 1: Buy long 500 USDT worth of the BTCUSDT contract at a last price of 5,000 USDT per BTC, with 10x leverage. Position margin = 500 / 10 = 50 USDT
Example 2: Buy long 500 USDT worth of the ETHUSDT contract at a last price of 500 USDT per ETH, with 10x leverage. Position margin = 500 / 10 = 50 USDT
4\. Margin Optimization for Hedged Positions
To improve capital efficiency and reduce margin requirements, SunX applies a margin offset mechanism when users hold hedged (long and short) positions of the same contract under the same margin mode.
New position margin = Long position margin + Short position margin - Locked margin \* Locked margin offset
Position margin = Face value per contract \* Position size \* Last price / Leverage
Locked margin = min (Long position margin, Short position margin)
Note: In the cross margin mode, the new position margin equals the sum of the new position margins across all supported contracts.
[PreviousTrading Fees](https://sunx.gitbook.io/sunx/trade/trading-fees)
[NextLiquidation](https://sunx.gitbook.io/sunx/trade/liquidation)
Last updated 1 month ago
---
# Risk Reminder | SunX
1\. Liquidity Risk
The risk of being unable to open or close positions smoothly.
· Affected Parties: Traders and market makers
2\. Funding Rate Risk
The risk of potential losses caused by changes in funding fee direction or rising funding rates.
· Affected Parties: Traders and market makers
3\. Market Risk
The risk of potential losses due to price fluctuations of the underlying asset.
· Affected Parties: Traders, market makers, liquidity providers.
4\. Smart Contract Risk
The risk of potential losses caused by vulnerabilities in smart contracts.
· Note: While SunX has undergone rigorous testing and auditing, it is still in the testing phase. Undiscovered vulnerabilities may exist and could be exploited. Core smart contracts are non-upgradable, and users bear all risks associated with usage.
5\. Market Maker Risk
The risk of potential losses due to protocol malfunction caused by inactive or malicious behavior from market makers.
· Risk Management: Market makers are strictly vetted and required to stake assets. Malicious or non-compliant behavior may result in significant slashing of the staked cryptos.
· Affected Parties: Traders, market makers, liquidity providers.
6\. Slippage Risk
The risk of potential losses from price fluctuations between order submission and execution.
· Note: All trades are executed at the oracle price, eliminating market impact. Traders bear the risk of price fluctuations during the confirmation window.
7\. Liquidity Provider Risk
Liquidity providers (LPs) may be unable to withdraw funds when pool utilization is high.
· Affected Party: Liquidity providers
8\. Network Stability Risk
The risk of potential losses caused by network outages or congestion, which may prevent position opening/closing, liquidation, or minting/burning of liquidity tokens.
· Affected Parties: Traders, market makers, liquidity providers.
[PreviousOrder Type](https://sunx.gitbook.io/sunx/trade/order-type)
[NextForced Liquidation and Prices](https://sunx.gitbook.io/sunx/trade/forced-liquidation-and-prices)
Last updated 1 month ago
---
# Take-Profit and Stop-Loss | SunX
A Take Profit (TP) or Stop Loss (SL) order is a preset order to close positions with a trigger (TP price or SL price) and a specified order price. When the latest traded price reaches the preset trigger price, the system will automatically place the order to lock in profits or stop losses. Currently, there are two ways to place TP/SL orders:
New position: You can place a TP order and/or an SL order in advance when placing a limit order to open a position. Once the limit order is executed (either partially or fully), the system will automatically place the TP and/or SL order(s) based on your preset trigger and order prices.
Existing position: You can set a TP order and/or an SL order for an existing position. When the latest traded price reaches the trigger price, the system will automatically place the limit order at the predefined price and amount.
[PreviousLiquidation](https://sunx.gitbook.io/sunx/trade/liquidation)
[NextFunding Rate](https://sunx.gitbook.io/sunx/trade/funding-rate)
Last updated 3 months ago
---
# Liquidation | SunX
1\. Account Margin Ratio
Margin ratio = (Position size \* Average entry price \* Maintenance margin rate) / Net position value
Net position value = Margin + Unrealized PnL + Funding fee - Taker fee
2\. Maintenance Margin
Maintenance margin (MM) is the minimum amount of margin balance required to keep your positions open.
Formula:
Maintenance margin = Position size (crypto) \* Average entry price \* Maintenance margin rate
3\. Liquidation Trigger
Forced liquidation is automatically triggered when your account margin ratio is lower than or equal to the maintenance margin ratio (i.e., when the margin ratio rises to 100% or above).
· The liquidation process is executed within a single block to avoid price slippage risks.
4\. Post-Liquidation Handling
After liquidation, any remaining margin will be transferred into the Insurance Fund.
The insurance fund is used to offset platform losses when, under extreme market conditions, liquidation losses exceed the user's initial margin (i.e. "forced liquidation" or "negative equity").
5\. Notes
· Forced Liquidation/Negative Equity
They refer to situations where extreme volatility causes position losses greater than your initial margin.
· Insurance Fund
Acting as a risk control mechanism, it is designed to cover users' negative equity, ensuring system stability and overall security.
[PreviousTrading Account and Margin](https://sunx.gitbook.io/sunx/trade/trading-account-and-margin)
[NextTake-Profit and Stop-Loss](https://sunx.gitbook.io/sunx/trade/take-profit-and-stop-loss)
Last updated 3 months ago
---
# Funding Rate | SunX
I. Overview
Funding fees are a mechanism designed to ensure that the price of perpetual futures contracts aligns closely with their underlying asset's spot market price. These fees are periodically exchanged between traders holding long and short positions to incentivize the convergence of the futures price with the spot price.
· Funding fees are exchanged every hour between holders of long and short positions. The funding rate, which dictates the fee exchange, fluctuates in real-time.
· Only traders holding positions at the time of settlement are liable to either pay or receive funding fees.
· The calculation of the funding fees is based on the position value at the time of settlement, using the formula:
Funding fee = Position size \* Index price \* Funding rate
· Funding intervals (1h, 2h, 4h, 8h) vary by trading pair.
II. How Funding Rate Is Calculated
The funding rate consists of two parts: Interest Rate (I) and Average Premium Index (P).
Funding rate (F) = Average premium index (P) + Clamp (Interest (I) - Average premium index (P), 0.05%, -0.05%)
Hence, if (I - P) is within the range of ±0.05%, then F = P + (I - P) = I. In other words, the funding rate will equal the interest rate.
1\. Interest (I)
Formula
Interest (I) = (Quote currency interest rate - Base currency interest rate) / Funding frequency
· Quote currency interest rate: The interest rate for borrowing the quote currency
· Base currency interest rate: The interest rate for borrowing the base currency
· Funding frequency = 24 / Funding interval (hour)
2\. Average Premium Index (P)
Formula
Premium index (P) = \[Max (0, Impact bid price - Index price) - Max (0, Index price - Impact ask price)\] / Index price
· Impact bid price: The average fill price to execute the Impact Margin Notional on the Bid side.
· Impact Ask Price: The average fill price to execute the Impact Margin Notional on the Ask side.
· Impact margin notional (IMN) is the notion available to trade with a certain amount of margin. It's used to determine how deep the order book is and to measure the impact bid or ask price.
SunX calculates the average premium index (P) every minute by performing an N-hour Time-Weighted-Average-Price (TWAP) over the series of minute rates. (N = Funding interval) The closer to the funding fee settlement time, the greater the weight of the premium index.
Taking a 4-hour funding interval as an example, the average premium index (P) is calculated using the formula:
(Premium index a \* 2 + Premium index b \* 2 +... + Premium index n \* 240) / (1 + 2 +... + 240).
III. Summary
SunX calculates the premium index (P) and the interest rate (I) every minute, and then performs an N-hour Time-Weighted-Average-Price (TWAP) over the series of minute rates. Funding rates (F) adopt a damping mechanism of ±0.05% based on the average value to mitigate fluctuations.
Funding rates (F) are applied to a trader's position value to determine the funding fee to be paid or received at the funding timestamp.
[PreviousTake-Profit and Stop-Loss](https://sunx.gitbook.io/sunx/trade/take-profit-and-stop-loss)
[NextLast Price and Index Price](https://sunx.gitbook.io/sunx/trade/last-price-and-index-price)
Last updated 1 month ago
---
# Last Price and Index Price | SunX
I. Last Price
Last Price refers to the last traded price of a futures contract, updated in real time and displayed in the order book. This metric, a must-watch especially for intraday traders and scalpers, reflects an immediate snapshot of current market conditions. It helps traders make timely decisions based on the latest data.
Primary Uses:
l Tracking the current market quotation.
l Calculating realized PnL (profit and loss from closed positions).
II. Index Price
Index Price is a fair price calculated with the weighted average of prices collected from multiple major crypto exchanges. These weights are dynamically updated every four hours to align with fluctuations on these platforms. Utilizing the index price helps you sidestep exchange-specific anomalies, making it advantageous for swing trading positions. Notably, this aggregated price is primarily used to calculate funding fees, ensuring fair funding rates across the market.
Primary Uses:
l Calculating unrealized PnL (i.e. floating profit and loss from open positions).
l Acting as the trigger benchmark for liquidations. A position is only liquidated if the index price reaches the liquidation threshold, helping prevent forced liquidations caused by malicious price manipulation on a single exchange.
III. Mark Price
Mark Price is a theoretical fair value calculated through a specific algorithm. Unlike the last price, it does not represent an actual trade on an exchange. It mainly reflects the true market value of an underlying asset and reduces the risk of unfair liquidations caused by thin liquidity or market manipulation.
· Market Price: The actual price at which orders are executed and closed on an exchange's order book, which can be highly volatile.
· Mark Price: A reference price used to calculate unrealized PnL and determine liquidation triggers. It is smoother, more stable, and fairer.
1\. How Mark Price is Calculated
The mark price is determined by the two key elements:
(1) Index price
Derived from aggregated spot prices across multiple major, highly liquid, and reliable global exchanges.
(2) Funding rate (for perpetual futures)
Ensures perpetual futures contracts track spot prices closely.
a. When the market is bullish, longs pay funding fees to shorts.
b. When the market is bearish, shorts pay funding fees to longs.
The expected funding rate adjustment is factored into the mark price calculation.
(3) Calculation method
The mark price is the median of the following three prices:
a. Funding basis fair price
b. Impact bid/ask price
c. Last EMA price
Special cases:
a. If one reference price is disabled, the mark price equals to the average of the remaining two, i.e., (a+b) / 2.
b. If two prices are disabled, the mark price equals to the remaining reference price.
2\. Mark Price's Core Functions
Mark Price is crucial for risk control and serves three main functions:
(1) Preventing unfair liquidations
Relying only on the market price for liquidations is risky because it's vulnerable to pumping and dumping by whales, which could push the price up and down in a short time to trigger a cascade of liquidations. That's why we use the mark price, a composite price across multiple spot markets, which smooths out these manipulation attempts and creates a fairer trading field for average traders.
(2) Fair calculation of unrealized PnL
Floating PnL is calculated based on the mark price to avoid extreme swings caused by temporary price anomalies on an exchange. Formula:
Unrealized PnL = (Mark price - Average entry price) \* Position size
This better reflects the true market value of open positions while filtering out short-term noise.
(3) Liquidation trigger benchmark
The system uses the mark price to calculate margin ratios and liquidation prices. A forced liquidation occurs only when the mark price reaches the liquidation price. This means traders are protected from being liquidated by temporary volatility in the local market.
[PreviousFunding Rate](https://sunx.gitbook.io/sunx/trade/funding-rate)
[NextTrading Rules](https://sunx.gitbook.io/sunx/trade/trading-rules)
Last updated 3 months ago
---
# Trading Rules | SunX
Trading Pair
Tick Size
Contract Face Value (Per Contract)
Maximum Number of Contracts per Opening Order
Maximum Number of Contracts per Closing Order
Maximum Number of Contracts per Close-then-Open Order
AAVE-USDT
0.001
0.1
17000
17000
17000
ADA-USDT
0.000001
10
59000
59000
59000
ARB-USDT
0.0001
1
1000000
1000000
1000000
ASTER-USDT
0.0001
1
100000
100000
100000
AVAX-USDT
0.0001
1
20000
20000
20000
BCH-USDT
0.01
0.01
83000
83000
83000
BNB-USDT
0.001
0.1
6000
6000
6000
BTC-USDT
0.1
0.001
43000
43000
43000
BTT-USDT
0.000000001
1000000
170000
170000
170000
CRV-USDT
0.0001
1
650000
650000
650000
DOGE-USDT
0.000001
100
43000
43000
43000
ENA-USDT
0.0001
1
670000
670000
670000
ETH-USDT
0.01
0.01
120000
120000
120000
FARTCOIN-USDT
0.00001
1
670000
670000
670000
HYPE-USDT
0.001
0.1
110000
110000
110000
JST-USDT
0.000001
10
330000
330000
330000
LDO-USDT
0.0001
1
420000
420000
420000
LINK-USDT
0.0001
0.1
220000
220000
220000
LTC-USDT
0.01
0.1
42000
42000
42000
PENDLE-USDT
0.0001
1
65000
65000
65000
PENGU-USDT
0.000001
100
31000
31000
31000
PUMP-USDT
0.000001
100
210000
210000
210000
SEI-USDT
0.0001
1
1000000
1000000
1000000
SOL-USDT
0.0001
0.1
49000
49000
49000
SPX-USDT
0.0001
1
90000
90000
90000
SUI-USDT
0.0001
1
150000
150000
150000
SUN-USDT
0.000001
100
250000
250000
250000
SUNDOG-USDT
0.00001
100
30000
30000
30000
TON-USDT
0.0001
0.1
1600000
1600000
1600000
TRUMP-USDT
0.001
0.1
590000
590000
590000
TRX-USDT
0.000001
100
10000
10000
10000
UNI-USDT
0.0001
1
53000
53000
53000
USDT
0.0001
1
WIN-USDT
0.00000001
10000
200000
200000
200000
XRP-USDT
0.00001
10
34000
34000
34000
ZORA-USDT
0.00001
10
140000
140000
140000
[PreviousLast Price and Index Price](https://sunx.gitbook.io/sunx/trade/last-price-and-index-price)
[NextPosition Risk Limits](https://sunx.gitbook.io/sunx/trade/position-risk-limits)
Last updated 3 months ago
---
# Contract Information | SunX
TRON:[TEubMt2TNag5NN1JXVaeysUk8GNTTYmtVX](https://tronscan.org/#/contract/TEubMt2TNag5NN1JXVaeysUk8GNTTYmtVX/code)
ETH:[0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7](https://etherscan.io/address/0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7)
BSC:[0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7](https://bscscan.com/address/0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7)
ARB:[0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7](https://arbiscan.io/address/0x4d1Be6c39Fe3fB1362ff602a6c0CBB5B3BF64eC7)
SOLANA:[9s435W1x3Gm9tG5zbRGhFtov6v2wKdzUXEfsdsiPd4Rz](https://solscan.io/account/9s435W1x3Gm9tG5zbRGhFtov6v2wKdzUXEfsdsiPd4Rz)
[PreviousPosition Risk Limits](https://sunx.gitbook.io/sunx/trade/position-risk-limits)
[NextSecurity Audit Report](https://sunx.gitbook.io/sunx/contract/security-audit-report)
Last updated 15 days ago
---
# Security Audit Report | SunX
[Smart Contract:Security Audit Report](https://github.com/slowmist/Knowledge-Base/blob/master/open-report-V2/smart-contract/Sunperp%20Dex%20-%20SlowMist%20Audit%20Report.pdf)
[Smart Contract:solana-smart-contract](https://github.com/slowmist/Knowledge-Base/blob/master/open-report-V2/smart-contract/solana-smart-contract/sunperp-sol-vault%20-%20SlowMist%20Audit%20Report.pdf)
[PreviousContract Information](https://sunx.gitbook.io/sunx/contract/contract-information)
[NextGas-Free Continues: Enjoy a 100% Gas Rebate on Your First TRON Approval](https://sunx.gitbook.io/sunx/activity/gas-free-continues-enjoy-a-100-gas-rebate-on-your-first-tron-approval)
Last updated 15 days ago
---
# Staking Rules | SunX
1. How Can I Earn Rewards
Staking calculates rewards based on snapshots of the USDT assets in your SunX account. You only need to maintain USDT in your account to Staking rewards.
This feature does not affect your regular trading or deposit/withdrawal operations, and you can transfer assets in or out at any time.
1. How can I earn staking rewards and what cryptos are included in the rewards?
You can earn rewards by holding/increasing the net equity of your USDT assets on SunX. The staking rewards currently consist of a 7% base APY (given in USDT) and a 3% APY boost (in TRX). You can claim your rewards at any time.
1. How to Check Rewards Records
To view your daily rewards history, navigate to the "Unclaimed Rewards" section on the Staking page and click "Details".
1. Reward Distribution
Once you manually claim your rewards, all participating crypto will be converted to USDT and deposited into your SunX account.
1. Supported Cryptocurrencies
Staking only supports USDT assets. For a complete list of supported cryptocurrencies, please visit the Staking homepage.
1. Interest-Bearing Principal Limits
Currently, there is no upper limit on the interest-bearing principal of USDT.
1. How are staking rewards calculated?
Here's how staking rewards for Day T are calculated: On Day T+1, the rewards you earn on Day T will be calculated based on the snapshot of your asset balance, randomly taken from the previous 24 hours. Your rewards will be distributed after 17:00 on Day T+2 (UTC+8). (No staking rewards for the day of deposits). Example: User A stakes 10,000 USDT on Jan 1. Snapshots of their assets will be randomly taken on Jan 2, and rewards will be calculated on Jan 3. Rewards will be distributed starting at 17:00 (UTC+8) on Jan 4.
1. How to earn an extra 3% APY?
If your snapshotted deposit balance is ≥10,000 USDT and you achieve a futures trading volume of ≥30% of your USDT balance on a day, you will earn an additional 3% APY on that day. Currently, the reward is distributed in TRX tokens and credited within 15 working days. We will support automatic reward distribution soon.
The interest-bearing principal limit is not fixed and may be adjusted dynamically by the platform without further notice.
[PreviousGas-Free Continues: Enjoy a 100% Gas Rebate on Your First TRON Approval](https://sunx.gitbook.io/sunx/activity/gas-free-continues-enjoy-a-100-gas-rebate-on-your-first-tron-approval)
[NextSunX Launches Staking with 12% APY](https://sunx.gitbook.io/sunx/activity/sunx-launches-staking-with-12-apy)
Last updated 1 month ago
---
# Gas-Free Continues: Enjoy a 100% Gas Rebate on Your First TRON Approval | SunX
You asked, we delivered. Back by popular demand, our "Gas-Free" event returns, helping you trade seamlessly with no gas cost.
How to Get Gas Fee Back
Event Period: Oct 16, 2025 until further notice (subject to official updates)
1. When your total deposits hit 100 USDT on Sun,X you'll receive a 100% rebate (i.e. 10 TRX) on your first TRON approval gas fee. The gas fee will be deducted on-chain first and reimbursed by the platform according to the following schedule:
2. Users who use energy proxy to pay the authentication fee can enjoy a limited-time offer of a 3 TRX rebate.
TRX Rebate Schedule
Round
First Approval Time
Rebate Distribution Time
Distribution Status
1
Sept 17-30
Oct 15-17
Completed 10 TRX/winner
2
Oct 1-15
Oct 31 - Nov 2
Completed 10 TRX/winner
3
Oct 16-31
Nov 15-17
Completed 10 TRX/winner
4
Nov 1 -15
Nov 30 -Dec 2
Pending
5
From Nov 16
\-
Rebates auto credited to winners' accounts within 24 hours
Notes:
1. The event is only open to deposits via the TRON network.
2. Due to network congestion and fluctuations in transaction fees, the launch of the real-time gas fee rebate feature will be delayed. For the reward distribution timeline for users participating from November 1, please refer to the table above.
3. Participants found engaging in malicious attacks, wash trading, or other fraudulent activities will be disqualified from receiving rewards.
4. SunX reserves the right for final interpretation of this event.
Don't hesitate, act now!
Save on gas fees and enjoy smooth trading.
SunX Team
[PreviousSecurity Audit Report](https://sunx.gitbook.io/sunx/contract/security-audit-report)
[NextStaking Rules](https://sunx.gitbook.io/sunx/activity/staking-rules)
Last updated 1 month ago
---
# SunX Launches Staking with 12% APY | SunX
Dear SunX Users,
To show our appreciation for your support, SunX is officially launching our Staking product. Assets held in your SunX account will effortlessly earn you a 12% APY. This feature is automatically enabled, requires no manual action, involves no lockup periods, and does not affect your futures trading with the staked assets.
Staking currently supports USDT assets only, offering a 12% fixed APY with no cap on rewards. Please note that SunX reserves the right to dynamically adjust the supported staking cryptocurrencies, their corresponding APY, and the rewards cap. For the most current details, please visit the Staking homepage.
Thank you for your support and trust. We eagerly anticipate your participation!
SunX Team
October 1, 2025
[PreviousStaking Rules](https://sunx.gitbook.io/sunx/activity/staking-rules)
[NextRefer Friends and Earn Up to 1,500 $SUN Every Day](https://sunx.gitbook.io/sunx/activity/refer-friends-and-earn-up-to-1-500-usdsun-every-day)
Last updated 25 days ago
---
# SunX to Adjust APY for Staking Product | SunX
Dear SunX Users,
The SunX platform will adjust the APY for its staking product to 10%, effective November 3, 2025 (UTC). This APY consists of two components, detailed below:
1\. 7% Base APY: Available to all users holding USDT with no minimum requirement. Staking rewards will be automatically paid in USDT.
2\. 3% Bonus APY: To qualify for this additional 3% rate, users must meet both of the following criteria on the same day:
l Maintain a snapshotted deposit balance of ≥10,000 USDT;
l Reach a futures trading volume of ≥30% of your USDT balance.
Currently, staking rewards for the Bonus APY will be paid in TRX tokens. Initial distributions will be handled manually within 15 working days, with automatic reward distribution coming soon.
The APY adjustment will become effective on November 3, 2025. Staking rewards accrued before this date will remain unchanged. Please stay tuned for future announcements regarding further updates.
\* The snapshot for USDT balances on November 3 will be taken on November 4. Staking rewards for November 3 will be paid on November 5 under the new APY structure.
SunX Team
[PreviousInvite Friends to Earn SunX Points and Redeem Them for USDT or an iPhone 17!](https://sunx.gitbook.io/sunx/activity/invite-friends-to-earn-sunx-points-and-redeem-them-for-usdt-or-an-iphone-17)
[NextRefer Friends to Boost Your Earnings: Get 10% Fee Rebate + 10% Bonus!](https://sunx.gitbook.io/sunx/activity/refer-friends-to-boost-your-earnings-get-10-fee-rebate-+-10-bonus)
Last updated 2 months ago
---
# Refer Friends and Earn Up to 1,500 $SUN Every Day | SunX
Dear SunX Users,
The Convergence Order is now live — rally your allies! Invite a friend to complete trades, and you can earn up to 300 $SUN with daily rewards up to 1,500 $SUN.
**Event Period:** 10:00 (UTC) on October 13 - 09:59 (UTC) on October 23
**How to Participate in the Referral Program?**
1\. Get your referral link: Go to the official SunX website, connect your wallet, and navigate to the Referral page to get your exclusive referral link or code.
2\. Share with friends: Send your referral link or code to your friends. They connect their wallet via the link or input your code under the Bind Inviter.
3\. Earn rewards: When your friends complete the trading tasks, both of you could receive rewards.
[Click here to view more>>](https://sunperp.gitbook.io/sunperp/points-and-rewards/how-to-get-or-bind-the-referral-code)
**Event Rules:**
During the event, invite friends to complete designated tasks, and each user can earn up to 1,500 $SUN per day.
**● First Deposit Bonus**
If your invitee completes their first deposit of ≥100 USDT, you’ll receive 70 $SUN, and each inviter can earn up to 400 $SUN per day.
**● First Trade Bonus**
If your invitee completes their first trade of ≥100 USDT, you’ll receive 100 $SUN, and they’ll get 50 $SUN.
**● 7-Day Milestone Bonus**
If your invitee reaches a trading volume of ≥20,000 USDT within 7 days, you’ll earn an additional 200 $SUN.
\*The above rewards are cumulative. The First Deposit Bonus must be claimed on the “[Welcome Hub](https://www.sunperp.com/futures/airdrop/)
” page and won't count toward the daily 1,500 $SUN limit. The First Trade Bonus and 7-Day Milestone Bonus will be issued within 14 working days after the event ends.
[Invite now>>](https://www.sunperp.com/futures/invite/)
**Terms & Conditions:**
● Only invitees who connect their wallet for the first time during the event are eligible. The user who had already deposited or traded before binding a referral code isn't eligible for the event.
● The First Trade Bonus and 7-Day Milestone Bonus will be distributed to users'SunX accounts within 14 working days after the event concludes.
● Users who engage in self-trading, wash trading, mass mutual referrals using the same funds, or scripted instant trades are not eligible to claim rewards.
● Users found engaging in malicious volume manipulation or internal wash trades will be disqualified from the rewards.
● SunX reserves the right of final interpretation to this event.
Thank you for your support and trust. We anticipate your participation!
SunX Team
October 13, 2025
[PreviousSunX Launches Staking with 12% APY](https://sunx.gitbook.io/sunx/activity/sunx-launches-staking-with-12-apy)
[NextInvite Friends to Earn SunX Points and Redeem Them for USDT or an iPhone 17!](https://sunx.gitbook.io/sunx/activity/invite-friends-to-earn-sunx-points-and-redeem-them-for-usdt-or-an-iphone-17)
Last updated 1 month ago
---
# Position Risk Limits | SunX
Symbol
Tier
Minimum Position
Maximum Position
Maintenance Margin Rate
Maximum Leverage
AAVE-USDT
1
1
830
2%
30
AAVE-USDT
2
831
1600
2%
20
AAVE-USDT
3
1601
6600
2%
10
AAVE-USDT
4
6601
13000
3%
5
ADA-USDT
1
1
23000
2%
30
ADA-USDT
2
23001
29000
2%
20
ADA-USDT
3
29001
110000
2%
10
ADA-USDT
4
110001
230000
3%
5
ARB-USDT
1
1
50000
2%
30
ARB-USDT
2
50001
100000
2%
20
ARB-USDT
3
100001
400000
2%
10
ARB-USDT
4
400001
800000
3%
5
ASTER-USDT
1
1
25000
2%
20
ASTER-USDT
2
25001
100000
3%
10
ASTER-USDT
3
100001
200000
4%
5
AVAX-USDT
1
1
8100
2%
30
AVAX-USDT
2
8101
10000
2%
20
AVAX-USDT
3
10001
40000
2%
10
AVAX-USDT
4
40001
81000
3%
5
BCH-USDT
1
1
33000
2%
30
BCH-USDT
2
33001
41000
2%
20
BCH-USDT
3
41001
160000
2%
10
BCH-USDT
4
160001
330000
3%
5
BNB-USDT
1
1
57
1%
75
BNB-USDT
2
58
420
1%
50
BNB-USDT
3
421
2200
2%
30
BNB-USDT
4
2201
2800
2%
20
BNB-USDT
5
2801
11000
2%
10
BNB-USDT
6
11001
22000
3%
5
BTC-USDT
1
1
1600
1%
100
BTC-USDT
2
1601
3500
1%
75
BTC-USDT
3
3501
4400
1%
50
BTC-USDT
4
4401
6700
1%
30
BTC-USDT
5
6701
8900
2%
20
BTC-USDT
6
8901
13000
2%
10
BTC-USDT
7
13001
26000
3%
5
BTT-USDT
1
1
41000
2%
20
BTT-USDT
2
41001
160000
3%
10
BTT-USDT
3
160001
330000
4%
5
CRV-USDT
1
1
32000
2%
20
CRV-USDT
2
32001
120000
3%
10
CRV-USDT
3
120001
250000
4%
5
DOGE-USDT
1
1
8600
2%
30
DOGE-USDT
2
8601
10000
2%
20
DOGE-USDT
3
10001
43000
2%
10
DOGE-USDT
4
43001
86000
3%
5
ENA-USDT
1
1
16000
1%
50
ENA-USDT
2
16001
33000
2%
30
ENA-USDT
3
33001
66000
2%
20
ENA-USDT
4
66001
260000
2%
10
ENA-USDT
5
260001
530000
3%
5
ETH-USDT
1
1
41000
1%
100
ETH-USDT
2
41001
58000
1%
75
ETH-USDT
3
58001
69000
1%
50
ETH-USDT
4
69001
110000
1%
30
ETH-USDT
5
110001
170000
2%
20
ETH-USDT
6
170001
230000
2%
10
ETH-USDT
7
230001
460000
3%
5
FARTCOIN-USDT
1
1
33000
2%
20
FARTCOIN-USDT
2
33001
130000
3%
10
FARTCOIN-USDT
3
130001
260000
4%
5
HYPE-USDT
1
1
5200
2%
20
HYPE-USDT
2
5201
21000
3%
10
HYPE-USDT
3
21001
42000
4%
5
JST-USDT
1
1
83000
2%
20
JST-USDT
2
83001
330000
3%
10
JST-USDT
3
330001
660000
4%
5
LDO-USDT
1
1
21000
2%
30
LDO-USDT
2
21001
42000
2%
20
LDO-USDT
3
42001
160000
2%
10
LDO-USDT
4
160001
330000
3%
5
LINK-USDT
1
1
88000
2%
30
LINK-USDT
2
88001
110000
2%
20
LINK-USDT
3
110001
440000
2%
10
LINK-USDT
4
440001
880000
3%
5
LTC-USDT
1
1
17000
2%
30
LTC-USDT
2
17001
21000
2%
20
LTC-USDT
3
21001
86000
2%
10
LTC-USDT
4
86001
170000
3%
5
PENDLE-USDT
1
1
5300
2%
20
PENDLE-USDT
2
5301
21000
3%
10
PENDLE-USDT
3
21001
43000
4%
5
PENGU-USDT
1
1
4300
1%
30
PENGU-USDT
2
4301
8600
2%
20
PENGU-USDT
3
8601
17000
2%
10
PENGU-USDT
4
17001
68000
2%
5
PUMP-USDT
1
1
52000
2%
20
PUMP-USDT
2
52001
200000
3%
10
PUMP-USDT
3
200001
410000
4%
5
SEI-USDT
1
1
83000
2%
30
SEI-USDT
2
83001
160000
2%
20
SEI-USDT
3
160001
660000
2%
10
SEI-USDT
4
660001
1300000
3%
5
SOL-USDT
1
1
9700
2%
30
SOL-USDT
2
9701
12000
2%
20
SOL-USDT
3
12001
48000
2%
10
SOL-USDT
4
48001
97000
3%
5
SPX-USDT
1
1
21000
2%
20
SPX-USDT
2
21001
85000
3%
10
SPX-USDT
3
85001
170000
4%
5
SUI-USDT
1
1
58000
2%
30
SUI-USDT
2
58001
73000
2%
20
SUI-USDT
3
73001
290000
2%
10
SUI-USDT
4
290001
580000
3%
5
SUN-USDT
1
1
12000
2%
20
SUN-USDT
2
12001
50000
3%
10
SUN-USDT
3
50001
50000
4%
5
SUNDOG-USDT
1
1
8300
2%
20
SUNDOG-USDT
2
8301
33000
3%
10
SUNDOG-USDT
3
33001
66000
4%
5
TON-USDT
1
1
640000
2%
30
TON-USDT
2
640001
810000
2%
20
TON-USDT
3
810001
3200000
2%
10
TON-USDT
4
3200001
6400000
3%
5
TRUMP-USDT
1
1
14000
1%
50
TRUMP-USDT
2
14001
29000
2%
30
TRUMP-USDT
3
29001
59000
2%
20
TRUMP-USDT
4
59001
230000
2%
10
TRUMP-USDT
5
230001
470000
3%
5
TRX-USDT
1
1
6000
2%
30
TRX-USDT
2
6001
7500
2%
20
TRX-USDT
3
7501
30000
2%
10
TRX-USDT
4
30001
60000
3%
5
UNI-USDT
1
1
21000
2%
30
UNI-USDT
2
21001
26000
2%
20
UNI-USDT
3
26001
100000
2%
10
UNI-USDT
4
100001
210000
3%
5
WIN-USDT
1
1
50000
2%
20
WIN-USDT
2
50001
200000
3%
10
WIN-USDT
3
200001
400000
4%
5
XRP-USDT
1
1
6800
2%
30
XRP-USDT
2
6801
8600
2%
20
XRP-USDT
3
8601
34000
2%
10
XRP-USDT
4
34001
68000
3%
5
ZORA-USDT
1
1
34000
2%
20
ZORA-USDT
2
34001
130000
3%
10
ZORA-USDT
3
130001
270000
4%
5
[PreviousTrading Rules](https://sunx.gitbook.io/sunx/trade/trading-rules)
[NextContract Information](https://sunx.gitbook.io/sunx/contract/contract-information)
Last updated 3 months ago
---
# Invite Friends to Earn SunX Points and Redeem Them for USDT or an iPhone 17! | SunX
Dear SunX Users,
**Earn rewards by inviting friends!**
Invite friends to join SunX , earn SunX Points, and redeem them for **USDT, an iPhone 17**, and other premium rewards. It's easier to win an iPhone 17 with the SunX referral reward than to buy it yourself.
Event Period: 10:00 (UTC) on Oct 31 - 15:59 (UTC) on Nov 6
**How to Participate:**
1\. Copy Your Invitation Link: Log in to SunX and navigate to the [Referral](https://www.sunwukong.io/zh-cn/futures/invite/)
page to copy your invitation link.
2\. Invite Friends: When your friends sign up via your link and complete the required tasks, both of you will earn points.
3\. Submit Your Invitation Code: Enter your SunX invitation code in the form to start accumulating points ([Click here to submit)](https://forms.gle/S2YJxKatAm6XdKxNA)
4\. Points Update: Invitation points will be updated daily before 13:00 (UTC) via Google Sheets.
**Reward Rules for Invitation Points:**
Earn points when your invitees complete tasks such as sign-ups, deposits, trading, or holding. Each user can earn up to 3,000 points.
[\>>Click here to submit your invitation code](https://forms.gle/S2YJxKatAm6XdKxNA)
Task
Inviter's Points
Invitee's Points
Invite 1 friend to sign up
+5
+5
Invite 1 friend to deposit 100 USDT
+5
+5
Invite 1 friend to trade 100 USDT
+25
+25
Your invitee holds assets for ≥24 hours
+30
+30
**Points Redemption Rules:**
Points will be distributed to users based on the highest tier they achieve after the event ends. The prize pool is set at $50,000. If the rewards for qualified participants exceed the pool, distribution will be prioritized by ranking.
Point
Reward
100 points
5 USDT
500 points
50 USDT
2,000 points
An iPhone 17 or 1,000 USDT
(Choose one)
**Daily Invitation Point Leaderboard (Updated daily before 13:00 UTC):**
[\>> Click here to check your ranking](https://docs.google.com/spreadsheets/d/1Oj7lhiPKche2kNBKooo8z2fsXlXWrq0xlboxJwbxCLQ/edit?usp=sharing)
**Terms and Conditions:**
● SunX reserves the right for final interpretation of this event.
● Points for the asset-holding task are calculated based on the holding duration. Once the requirement is met, points will be automatically granted.
● Only invitees who connect their wallet for the first time during the event are eligible. The user who had already deposited or traded before binding a referral code isn't eligible for the event.
● The rewards will be credited to the winners' SunX accounts within 14 working days after the end of the event.
● Users who engage in self-trading, wash trading, mass mutual referrals using the same funds, or scripted instant trades are not eligible to claim rewards.
● Users found engaging in malicious volume manipulation or internal wash trades will be disqualified from the rewards.
● SunX reserves the right for final interpretation of this event.
Thank you for your support and trust. We anticipate your participation!
SunX Team
October 31, 2025
[PreviousRefer Friends and Earn Up to 1,500 $SUN Every Day](https://sunx.gitbook.io/sunx/activity/refer-friends-and-earn-up-to-1-500-usdsun-every-day)
[NextSunX to Adjust APY for Staking Product](https://sunx.gitbook.io/sunx/activity/sunx-to-adjust-apy-for-staking-product)
Last updated 2 months ago
---
# Refer Friends to Boost Your Earnings: Get 10% Fee Rebate + 10% Bonus! | SunX
Dear SunX Users,
Refer and Earn! High fee rebates and boosted bonuses are waiting for you. Simply invite friends to sign up and trade on SunX, and both you and your friends will receive generous rewards, making earning easier than ever.
Event Period: 16:00 (UTC) on Nov 10 - 15:59 (UTC) on Nov 18
**How to Participate?**
**● Copy Your Invitation Link:** Log in to SunX and navigate to the Referral page to copy your invitation link.
**● Invite Friends:** Use your invitation link to invite friends to sign up on SunX and complete the trading task.
**● Enjoy Rewards:** Both you and your invitee will receive fee rebates and additional bonuses based on actual trading volume.
[\>>Click here to submit your invitation code](https://forms.gle/iGhDCLoz1UZtoMC37)
**Reward Rules:**
Invite friends to SunX during this event. When your invitee signs up and reaches 200 USDT in trading volume, you'll both receive rewards! Details are provided below:
**● Invite 1 or more friends:**
○ Earn 5% fee rebate on your own trades.
○ Earn 20% bonus (original 15% + 5% boost) from your invitee's trades.
**● Invite 3 or more friends:**
○ Earn 10% fee rebate on your own trades.
○ Earn 25% bonus (original 15% + 10% boost) from your invitee's trades.
● Your invitee earns 5% fee rebate.
**Terms and Conditions:**
● The fee rebate is calculated from your own trading fees, while the bonus boost is calculated based on your invitee's trading fees.
● Only invitees who connect their wallet for the first time during the event are eligible. The user who had already deposited or traded before binding a referral code isn't eligible for the event.
● The rewards will be credited to the winners' SunX accounts within 14 working days after the end of the event.
● Users who engage in self-trading, wash trading, mass mutual referrals using the same funds, or scripted instant trades are not eligible to claim rewards.
● Users found engaging in malicious volume manipulation or internal wash trades will be disqualified from the rewards.
● SunX reserves the right for final interpretation of this event.
Thank you for your support and trust. We anticipate your participation!
SunX Team
November 10, 2025
[PreviousSunX to Adjust APY for Staking Product](https://sunx.gitbook.io/sunx/activity/sunx-to-adjust-apy-for-staking-product)
[NextJoin SunX's Affiliate Program Win limited-time +10% bonus & up to $2,888](https://sunx.gitbook.io/sunx/activity/join-sunxs-affiliate-program-win-limited-time-+10-bonus-and-up-to-usd2-888)
Last updated 1 month ago
---
# SunX Launches Airdrop Giveaway #1 - $5,000,000 for Arbitrum Community | SunX
To celebrate our rebranding, SunX is specially launching a series of Airdrop Giveaways. The inaugural phase offers $5,000,000 and is dedicated to rewarding users in the Arbitrum ecosystem. Generous rewards await you! Claim up to a $50,000 reward.
**I. Event Schedule**
• Event Start Time: 12:00 (UTC) on Nov 20, 2025
• Airdrop Query Deadline: 16:00 (UTC) on Jan 19, 2026
• Duration: 60 days
**II. Airdrop Eligibility Check**
• Eligibility: This airdrop is exclusively for Arbitrum wallet addresses.
• How to Check Eligibility: Please visit our official event page and enter your wallet address to check your eligibility.
**III. How to Claim Rewards**
Eligible users can claim airdrop rewards in just two simple steps:
**Step 1: Claim a Basic Reward**
1\. Connect your Arbitrum wallet address on the event page.
2\. Complete a trade of any pair worth at least 100 USDT on SunX.
3\. Claim an airdrop of $2-$300 on the event page.
**Step 2: Claim an Advanced Reward**
1\. Keep trading on SunX.
2\. Your Advanced Reward amount will be calculated based on your cumulative trading volume during the event.
3\. The Advanced Reward tiers vary; the more you trade, the larger the reward, with a maximum reward of $50,000.
**IV. Notes**
1\. Event rewards will be distributed in the form of USDT.
2\. Rewards can be claimed upon completion of the specified tasks.
3\. Rewards cannot be claimed after the event ends, so please claim your rewards promptly according to the event schedule.
4\. SunX will strictly monitor any malicious behavior, such as volume manipulation, wash trading, and self-trading. If such behavior is detected, SunX will revoke their qualification for the event.
5\. SunX reserves the right for the final interpretation of this event.
For users who do not qualify for this airdrop, please stay tuned for the upcoming phase.
[PreviousJoin SunX Futures Trial Bonus Early Bird Program: Invite Friends and Unlock Exclusive Privileges](https://sunx.gitbook.io/sunx/activity/join-sunx-futures-trial-bonus-early-bird-program-invite-friends-and-unlock-exclusive-privileges)
[NextSunX's "Trading to Top the Leaderboard" Program for Affiliates Launched!](https://sunx.gitbook.io/sunx/activity/sunxs-trading-to-top-the-leaderboard-program-for-affiliates-launched)
Last updated 1 month ago
---
# SunX's "Trading to Top the Leaderboard" Program for Affiliates Launched! | SunX
Event Period: 16:00 (UTC) on November 20, 2025 — 15:59 (UTC) on January 31, 2026 (Rewards are settled and distributed monthly according to the natural month!)
**Eligibility:** All SunX Affiliates
**How to Participate:** [Contact your business manager or just register for this event>>](https://forms.gle/cRmtx7e2FCJqkNdL8)
.
In the spirit of gratitude, SunX has launched the "Trading to Top the Leaderboard" Program exclusively for affiliates! A total prize pool of 100,000 USDT awaits you! During the event period, invite friends to register and trade, and meet the trading fee requirement, then you can enjoy rewards for three consecutive months, with up to 10,000 USDT per natural month! Let your efforts earn incredible returns!
Monthly Cumulative Trading Fee Requirement
(USDT Equivalent)
Reward
(USDT Equivalent)
≥ 1,000
200
≥2,000
400
≥ 4,000
800
≥ 8,000
1,600
≥ 16,000
3,200
≥32,000
6,400
≥50,000
10,000
\*Rewards from this event are not cumulative. Users will only receive the highest reward their trading volume qualifies them for.
**Terms and Conditions:**
1\. Fees generated from the Trade to Earn event will be excluded.
2.Rewards will be distributed to eligible participants within 14 working days at the end of every natural month.
3\. Participants cannot win rewards from both this event and other promotions of the same kind. If you qualify for multiple rewards, you will receive the highest reward applicable to you.
4\. Participants involved in using bots, cheating, or duplicate registration will be disqualified. Using multiple accounts will also result in disqualification from rewards.
\*SunX reserves the right for final interpretation of this event.
[PreviousSunX Launches Airdrop Giveaway #1 - $5,000,000 for Arbitrum Community](https://sunx.gitbook.io/sunx/activity/sunx-launches-airdrop-giveaway-1-usd5-000-000-for-arbitrum-community)
[NextRewards Worth $1.35 Million Are Here|SunX's Trade to Earn #1 Is Live](https://sunx.gitbook.io/sunx/activity/rewards-worth-usd1.35-million-are-here-sunxs-trade-to-earn-1-is-live)
Last updated 1 month ago
---
# Join SunX's Affiliate Program Win limited-time +10% bonus & up to $2,888 | SunX
Event Period: 16:00 (UTC) on Nov 10, 2025 - 15:59 (UTC) on Nov 20, 2025
Eligibility: [All SunX Affiliates](https://forms.gle/YRdD6z1s9jauaghK7)
How to Participate: Contact your business manager or just register for this event(https://forms.gle/YRdD6z1s9jauaghK7).
Have splurged for Double 11? Don't panic! SunXs "Recovery Plan" is here to help your assets bounce back!
**\[Additional Bonus\] +5% for the First Month!**
Newly onboarded affiliates during the event period will receive an additional 5% bonus on their earnings for the first month.
**\[Referral Bonus\] Limited-Time +5% Bonus + Your Invitees Get $11**
Exclusive for affiliates: During the event, invite friends to register and trade, and get an extra 5% limited-time bonus!
Exclusive for invitees: Only the first 20 invitees of an affiliate will each receive a $11 bonus. First come, first served!
\*Only invitees who join SunX using your referral link or invitation code and achieve a trading volume of at least 50,000 USDT during the event are eligible.
**\[Trading Bonus\] Earn up to $2,888!**
During the event, affiliates whose cumulative trading volume meets the threshold will get the corresponding reward.
Cumulative Trading Volume Requirement
Reward
60 million USDT
2,888 USDT
24 million USDT
1,288 USDT
12 million USDT
588 USDT
6 million USDT
288 USDT
2 million USDT
88 USDT
**Terms and Conditions:**
1\. Only trading volumes of trades whose fees have been paid are counted for this event.
2\. Event Period for Extra Bonus: Nov 11 – Dec 10
3\. Participants cannot win rewards from both this event and other promotions of the same kind. If you qualify for multiple rewards, you will receive the highest reward applicable to you.
4\. Participants involved in using bots, cheating, or duplicate registration will be disqualified. Using multiple accounts will also result in disqualification from rewards.
\*SunX reserves the right for final interpretation of this event.
[PreviousRefer Friends to Boost Your Earnings: Get 10% Fee Rebate + 10% Bonus!](https://sunx.gitbook.io/sunx/activity/refer-friends-to-boost-your-earnings-get-10-fee-rebate-+-10-bonus)
[NextJoin SunX Futures Trial Bonus Early Bird Program: Invite Friends and Unlock Exclusive Privileges](https://sunx.gitbook.io/sunx/activity/join-sunx-futures-trial-bonus-early-bird-program-invite-friends-and-unlock-exclusive-privileges)
Last updated 1 month ago
---
# Join SunX Futures Trial Bonus Early Bird Program: Invite Friends and Unlock Exclusive Privileges | SunX
SunX Futures Trial Bonus is coming soon!
We're introducing the Futures Trial Bonus Early Bird Program, inviting you to be among the first users to experience it. With the Futures Trial Bonus, you can explore futures trading without risking your own capital, amplify potential profits, and reduce liquidation pressure.
By inviting friends to join, both of you will receive multiple exclusive benefits, including Futures Trial Bonuses, a fee-free first futures trade, and additional fee rebates. _This allows you to place your first futures trade with zero capital required._
Event Period: 10:00 (UTC) on Nov 17, 2025 - 15:59 (UTC) on Nov 20, 2025
[Register Now](https://forms.gle/sC8mBz9MxA7FMnok6)
Futures Trial Bonus: Can be used to offset a portion of futures trading fees, funding rates, or position losses. Detailed usage rules will be provided on the event page soon.
**Reward 1: Invite 1 Friend to Unlock the “Early Bird Officer” Status**
Invite one friend to sign up and complete a futures trade of ≥20 USDT on SunX . Once successful, both you and your invitee will receive the following rewards:
● For You (Inviter): 10 USDT Futures Trial Bonus + Early Bird Officer status.
● For Your Invitee: 5 USDT Futures Trial Bonus + a fee-free first futures trade, giving them a zero-cost start to futures trading.
**Reward 2: Invite More Friends to Unlock the “Supreme Experience Officer” Status**
The more friends you invite, the higher your rank and the greater your rewards. Earn increased Futures Trial Bonuses and gain the chance to access new platform features ahead of others.
**Officer Level**
**Invitees Needed**
**Rewards**
Junior
≥3
15 USDT Futures Trial Bonus
Senior
≥5
60 USDT Futures Trial Bonus + Eligibility to Compete for Supreme Status
Supreme
Top 50 by Number of Invitees
200 USDT Futures Trial Bonus + Early Access to Test New Platform Features
**Reward 3: Earn an Extra 10% Bonus to Boost Passive Income**
For invitees who sign up during the event, you’ll earn an additional 10% bonus on top of the base rate from the futures trading fees generated by your invitees within 7 days of their registration.
**Example:**
● Your invitee generates 100 USDT in futures trading fees.
● Your Earnings = 20 USDT (20% Base) + 10 USDT (10% Event Bonus)
● Total Bonus: 30 USDT
**Reward 4: Invitee's 7-Day Growth Gift — Unlock Futures Trial Bonuses and Fee Discounts**
If your invitee achieves a daily futures trading volume of ≥ 200 USDT, they can unlock up to 25 USDT in Futures Trial Bonuses plus a 10% fee discount:
● Trade ≥ 2 Days: Receive a 5 USDT Futures Trial Bonus.
● Trade ≥ 3 Days: Receive an 8 USDT Futures Trial Bonus.
● Trade ≥ 7 Days: Receive a 12 USDT Futures Trial Bonus + a 10% Trading Fee Discount (valid for 30 days).
**Terms and Conditions**
● Users must click “Register Now” to participate in the event and provide the correct referral code.
● The prize pool is set at 50,000 USDT in Futures Trial Bonuses and will be distributed in descending order according to the invitees' trading volumes.
● Only invitees who connect their wallet for the first time during the event are eligible. The user who had already deposited or traded before binding a referral code isn't eligible for the event.
● The rewards will be credited to the winners' SunX accounts within 14 working days after the end of the event.
● Users who engage in self-trading, wash trading, mass mutual referrals using the same funds, or scripted instant trades are not eligible to claim rewards.
● Users found engaging in malicious volume manipulation or internal wash trades will be disqualified from the rewards.
● SunX reserves the right for final interpretation of this event.
Thank you for your support and trust. We anticipate your participation!
SunX Team
November 17, 2025
[PreviousJoin SunX's Affiliate Program Win limited-time +10% bonus & up to $2,888](https://sunx.gitbook.io/sunx/activity/join-sunxs-affiliate-program-win-limited-time-+10-bonus-and-up-to-usd2-888)
[NextSunX Launches Airdrop Giveaway #1 - $5,000,000 for Arbitrum Community](https://sunx.gitbook.io/sunx/activity/sunx-launches-airdrop-giveaway-1-usd5-000-000-for-arbitrum-community)
Last updated 1 month ago
---
# Rewards Worth $1.35 Million Are Here|SunX's Trade to Earn #1 Is Live | SunX
Dear SunX Users,
In appreciation of your great support, SunX is excited to officially launch the Trade to Earn (Phase I) event. Simply make perpetual futures trades in our designated pairs, and you will get all your trading fees returned and win extra SUN tokens.
The event rewards will be distributed in $SUN. All net fees generated from registered participants trading the designated trading pairs during the event will be used for $SUN buybacks. This will provide you with an unprecedented opportunity for asset growth while ensuring stable $SUN appreciation.
[Trade Now>>](https://www.sunx.io/futures/tradeMining/)
**I. Event Period**
● Event Period: 12:00:00 (UTC) on November 21, 2025 – 12:00:00 (UTC) on December 6, 2025
● The "Trade & Earn" event is on a daily basis. A day is defined from 12:00 (UTC) on Day T to 12:00 (UTC) on Day T+1.
● The daily prize pool is divided into 24 portions, with a new portion released every hour.
● Event rewards will be calculated and updated starting on Day T+2 at 04:00 (UTC). Please claim your $SUN in time.
**II. Event Rules**
● Eligibility: Register to participate in the event.
● Applicable Trading Pairs: BTCUSDT, ETHUSDT, and SUNUSDT
● Prize Pools:
● Daily Prize Pool: 90,000 USDT in $SUN
● Total Prize Pool: 1,350,000 USDT in $SUN
● The daily prize pool is a fixed value in USDT, and the event will calculate the $SUN amount in each pool based on the $SUN price at the start of the day.
● For instance, if the $SUN price is 0.03 USDT at 12:00 (UTC) on Day T when the event starts, and the prize pool of the day is 90,000 USDT, then the total $SUN amount for the day would be 3,000,000 $SUN.
**III. Reward Calculation**
● Reward Formula: Reward Amount = User's Actual Trading Fees (USDT) for the Day × Corresponding Reward Percentage ÷ $SUN Price at 12:00 (UTC) on Day T.
● Reward Rate:
Maker: 110%
Taker: 107%
● Hourly Reward Cap for Each User: 500 USDT in $SUN.
For example, assume that the $SUN price is 0.03 USDT at the start of the "Trade to Earn" event at 12:00 (UTC) on Day T, and a participant generates 100 USDT in fees from BTC/USDT trading pair between 12:00 (UTC) on Day T and 11:59 (UTC) on Day T+1, all as Maker orders, and that the fees are generated before the depletion of the prize pool and the participant's reward cap is not reached,
the participant's daily reward of $SUN will be: 100 × 110% ÷ 0.03 = 3,667.
Rewards will be updated and made available for claim at 04:00 (UTC) on Day T+2.
**IV. $SUN Buyback and Burn Mechanism**
All net fees generated from registered participants trading the designated trading pairs during the event will be used for $SUN buybacks, ensuring stable appreciation of $SUN. $SUN token buyback will take place on the HTX platform, and the repurchased $SUN will be entirely burnt, with the schedule at the end of each quarter. Specific timing will be announced separately.
To facilitate buyback calculations, the daily trading fee statistics period is set from 00:00 to 23:59 (UTC+8) each day. The event starts at 20:00:00 (UTC+8) on T day. The first trading fee calculation period will be from 00:00 (UTC+8) to 23:59 (UTC+8) on T+1 day. The first buyback, based on trading fees generated on T+1 day, will be completed on T+2 day.
For the details of daily buyback after the event starts, please refer to further announcements.
[$SUN Buyback Details for "Trade to Earn" Event](https://sunx.gitbook.io/sunx/activity/usdsun-buyback-details-for-trade-to-earn-event)
**V. Notes**
● $SUN will be distributed on the SunX platform. Users are recommended to participate via the Tron blockchain network. If other blockchains are chosen, SunX plans to launch a one-click $SUN-to-USDT exchange feature in Q4 2025. Stay tuned!
● Market makers are not eligible to participate in this event.
● During the event, there is a cap on the rewards that each participant can receive per hour. Participants will not be able to receive additional rewards if they reach their individual reward limit or if the overall prize pool limit is reached.
● Participants in the "Trade to Earn" event will receive a portion of their trading fees as a reward. No referral bonuses will be paid to the referrer until the prize pool is depleted, but all other trading-fee-based referral bonuses remain unaffected.
● Trading rewards will be distributed after deducting rewards from the Welcome Hub- Daily Trading Contest.
● SunX reserves the right to disqualify users engaging in cheating and revoke their rewards.
● SunX reserves the right for final interpretation of this event.
Thank you for your support and trust. We eagerly anticipate your participation!
SunX Team
November 21, 2025
[PreviousSunX's "Trading to Top the Leaderboard" Program for Affiliates Launched!](https://sunx.gitbook.io/sunx/activity/sunxs-trading-to-top-the-leaderboard-program-for-affiliates-launched)
[Next$SUN Buyback Details for "Trade to Earn" Event](https://sunx.gitbook.io/sunx/activity/usdsun-buyback-details-for-trade-to-earn-event)
Last updated 1 month ago
---
# $SUN Buyback Details for "Trade to Earn" Event | SunX
Dear SunX Users,
SunX is currently running the "Trade to Earn" event with no fixed schedule. The daily buyback details for $SUN will be continuously updated in this announcement. $SUN token buyback will take place on the HTX platform, and the repurchased $SUN will be entirely burnt, with the schedule at the end of each quarter. Specific timing will be announced separately.
For event details, [please read here>>](https://www.sunx.io/futures/tradeMining/)
Buyback Details: During the "Trade to Earn" event, the platform's all fee income generated from registered participants trading the designated perpetual futures trading pairs will be used for $SUN buybacks.
Buyback Details of the Trade to Earn Event: The fee income is from the BTC/USDT, ETH/USDT, and SUN/USDT trading pairs. The following only shows the total amount denominated in USDT.
For details of the event #2, [please read here>>](https://sunx.gitbook.io/sunx/activity/usd1.35m-rewards-or-join-trade-to-earn-2-on-sunx)
Date (UTC+8)
Fee Income
(USDT)
$SUN Buyback Amount
Dec 11, 2025
6,279.65
309,916.53
Dec 12, 2025
9,848.43
486,044.80
Dec 13, 2025
7,777.10
383,052.58
Dec 14, 2025
15,500.34
763,452.35
Dec 15, 2025
20,789.07
1,024,967.95
Dec 16, 2025
15,345.98
756,606.12
Dec 17, 2025
26,371.23
1,299,337.46
Dec 18, 2025
22,583.14
1,112,694.39
Dec 19, 2025
26,149.43
1,941,972.65
Dec 20, 2025
26,106.23
2,837,671.79
Dec 21, 2025
29,701.34
1,463,205.67
Dec 22, 2025
32,053.74
1,579,094.21
Dec 23, 2025
39,453.65
1,941,972.65
Dec 24, 2025
57,650.92
2,837,671.79
Dec 25, 2025
53,148.69
2,700,126.12
Dec 26, 2025
28,721.07
1,501,429.31
For details of the event #1, [please read here>>](https://sunx.gitbook.io/sunx/activity/rewards-worth-usd1.35-million-are-here-sunxs-trade-to-earn-1-is-live)
Date (UTC+8)
Fee Income
(USDT)
$SUN Buyback Amount
Nov 23, 2025
80.61
3,844.84
Nov 24, 2025
36.87
1,758.65
Nov 25, 2025
3,227.04
153,914.82
Nov 26, 2025
5,276.58
251,397.25
Nov 27, 2025
6,342.17
299,916.83
Nov 28, 2025
8,724.71
409,253.71
Nov 29, 2025
10,094.45
497,288.04
Nov 30, 2025
10,612.05
522,789.23
Dec 1, 2025
11,037.08
537,562.87
Dec 2, 2025
13,478.32
656,969.11
Dec 3, 2025
10944.07
509090.44
Dec 4, 2025
13665.58
635688.19
Dec 5, 2025
15384.95
715668.93
Dec 6, 2025
16468.84
766088.75
Dec 7, 2025
20802.85
967695.93
**Notes:**
● To facilitate buyback calculations, the daily trading fee statistics period is from 00:00 to 23:59 (UTC+8) each day. For example, following the event's start at 20:00:00 (UTC+8) on November 21, 2025, the first trading fee calculation period will run from 00:00 (UTC+8) to 23:59 (UTC+8) on November 22, 2025. The first buyback, based on trading fees generated on November 22, will be completed and released on November 23. Meanwhile, the last trading fee statistics period will occur from 00:00 (UTC+8) to 23:59 (UTC+8) on December 6, 2025, as the event ends on the same day, at 20:00:00 (UTC+8). Therefore, the last buyback based on trading fees generated on December 6 will be completed and released on December 7.
● Starting from 16:00:00 (UTC) on November 20, 2025, participants in the "Trade to Earn" event will receive a portion of their trading fees as a reward. No referral bonuses or rebates will be given until the prize pool is depleted. Other trading-fee-based referral bonuses and rebates will remain unaffected.
Thank you for your support!
SunX Team
November 21, 2025
[PreviousRewards Worth $1.35 Million Are Here|SunX's Trade to Earn #1 Is Live](https://sunx.gitbook.io/sunx/activity/rewards-worth-usd1.35-million-are-here-sunxs-trade-to-earn-1-is-live)
[NextSunX Embarks Anew|Invite Friends and Share 1 Million $SUN](https://sunx.gitbook.io/sunx/activity/sunx-embarks-anew-invite-friends-and-share-1-million-usdsun)
Last updated 7 days ago
---
# SunX Embarks Anew|Invite Friends and Share 1 Million $SUN | SunX
Dear Users,
The SunPerp has been officially rebranded to SunX! Invite like-minded trading partners to share 1 Million $SUN growth bonuses, compounded with the Welcome Fiesta rewards and 20% referral bonus — all in together for the next chapter of professional trading.
**Event Period:** 10:00 (UTC) on Nov 24 - 09:59 (UTC) on Dec 3
[Invite now>>](https://forms.gle/htnDfdxg4K7z1bnv6)
**How to Participate in the Referral Program?**
1\. Get your referral link: Log into SunX, and navigate to the [Referral page](https://www.sunx.io/futures/invite/)
to get your exclusive referral link or code.
2\. Share with friends: Send your referral link or code to your friends. They connect their wallet via the link or input your code under the Link Referral Relationship.
3\. Earn rewards: When your friends complete the trading tasks, both of you could receive rewards.
[Click here to view more>>](https://sunx.gitbook.io/sunx/points-and-rewards/how-to-get-or-bind-the-referral-code)
**Event Details:**
For each successful referral you earn up to 130 $SUN, and your friend earns up to 130 $SUN. A total of 1 million $SUN is ready to be shared by you and your friends!
● First Trade Bonus
If your invitee completes their first trade of ≥300 USDT, you’ll receive 30 $SUN, and they’ll get 20 $SUN.
● 7-Day Milestone Bonus
If your invitee reaches a trading volume of ≥20,000 USDT within 7 days, you’ll both earn 100 $SUN.
\*You can enjoy rewards from this event together with the Welcome Fiesta rewards and the 20% referral bonus.
**Terms and Conditions**
● The total prize pool is 1 million $SUN. If the number of winners exceeds the pool limit, rewards will be distributed based on invitees’ trading volumes in descending order until the pool is exhausted.
● Only invitees who connect their wallet for the first time during the event are eligible. The user who had already deposited or traded before binding a referral code isn't eligible for the event.
● Within 3 days after the event ends, both the inviter and the invitee will be eligible for rewards if the invitee’s net deposit is ≥ 10 USDT.
● The rewards are accumulative and will be credited to the winners' SunX accounts within 14 working days after the end of the event.
● Users who engage in self-trading, wash trading, mass mutual referrals using the same funds, or scripted instant trades are not eligible to claim rewards.
● Users found engaging in malicious volume manipulation or internal wash trades will be disqualified from the rewards.
● SunX reserves the right for final interpretation of this event.
Thank you for your support and trust. We anticipate your participation!
SunX
Nov 24, 2025
[Previous$SUN Buyback Details for "Trade to Earn" Event](https://sunx.gitbook.io/sunx/activity/usdsun-buyback-details-for-trade-to-earn-event)
[NextDual Rewards for SunX Affiliates,Win a Limited-Time Extra 10% Bonus & Up to $2,800](https://sunx.gitbook.io/sunx/activity/dual-rewards-for-sunx-affiliates-win-a-limited-time-extra-10-bonus-and-up-to-usd2-800)
Last updated 1 month ago
---
# $1.35M Rewards | Join "Trade to Earn" #2 on SunX | SunX
Dear SunX Users,
In appreciation of your great support, SunX is thrilled to officially launch phase 2 of the Trade to Earn event. Simply make perpetual futures trades in our designated pairs, and you will get all your trading fees returned and win extra SUN tokens.
The event rewards will be distributed in $SUN. All trading fees generated from registered participants trading the designated trading pairs during the event will be used for $SUN buybacks. This will provide you with an unprecedented opportunity for asset growth while ensuring stable $SUN appreciation.
[**Register Now>>**](https://www.sunx.io/futures/tradeMining/)
**I. Event Schedule**
● Event Period: 12:00:00 (UTC) on Dec 10, 2025 - 12:00:00 (UTC) on Dec 25, 2025
● The Trade to Earn event is on a daily basis. A day is defined from 12:00 (UTC) on Day T to 12:00 (UTC) on Day T+1.
● The daily prize pool is divided into 24 portions, with each portion released on the hour.
● Rewards are calculated and updated hourly. You can claim your $SUN rewards from the second hour after each session ends.
**II. Event Rules**
● Eligibility: Anyone who registers for the event.
● Applicable Trading Pairs: BTCUSDT, ETHUSDT, and SUNUSDT
● Prize Pools:
Pair
Daily $SUN Prize Pool
Total $SUN Prize Pool
BTCUSDT
35,000 USDT
525,000 USDT
ETHUSDT
35,000 USDT
525,000 USDT
SUNUSDT
20,000 USDT
300,000 USDT
Total
90,000 USDT
1,350,000 USDT
● The daily prize pool for each pair has a fixed value in USDT, and the event will calculate the $SUN amount in each pool based on the $SUN price at the start of each session.
**○** For instance, if the $SUN price is 0.02 USDT at 12:00 (UTC) on Day T when the event starts, and the prize pool of the hour (12:00 - 13:00) for BTCUSDT is 1,458 USDT, i.e., 72,900 $SUN (= 1,458 / 0.02).
**III. Reward Calculation**
● Reward Formula: Reward amount per trade = User's actual trading fees paid for the trade (USDT) \* Corresponding reward rate \* $SUN's price at the start of the session.
● Reward Rates:
○ Maker: 110%
○ Taker: 107%
● Hourly Reward Cap Per Participant:
Pair
Hourly Reward Cap Per User ($SUN Equivalent)
BTCUSDT
200 USDT
ETHUSDT
200 USDT
SUNUSDT
100 USDT
Total
500 USDT
Example: Assume that the $SUN price is 0.02 USDT when the event starts at 12:00 (UTC) on Day T, and a participant generates 100 USDT fees by trading BTCUSDT between 12:00 (UTC) and 13:00 (UTC) on Day T. The order is a maker order, the fees are generated before the depletion of the prize pool, and the participant's reward cap is not reached.
The participant's reward earned from the order is: 100 \* 110% / 0.02 = 5,500 $SUN
The reward is updated and available for claim at 14:00 (UTC) on Day T.
**IV. $SUN Buyback and Burn Mechanism**
All net fees generated from registered participants trading the designated trading pairs during the event will be used for $SUN buybacks, ensuring stable appreciation of $SUN. $SUN buybacks take place on the HTX platform, and the repurchased $SUN will be entirely burnt, with the schedule at the end of each quarter. Specific timing will be announced separately.
To facilitate buyback calculations, the daily trading fee statistics period is set from 00:00 to 23:59 (UTC+8) each day. If the event starts at 20:00:00 (UTC+8) on Day T, the first trading fee calculation period will be from 00:00 (UTC+8) to 23:59 (UTC+8) on Day T+1. The buyback, based on trading fees generated on Day T+1, will be completed on Day T+2.
For the details of the daily buyback after the event starts, please refer to further announcements.
[$SUN Buyback Details for "Trade to Earn" Event](https://sunx.gitbook.io/sunx/activity/usdsun-buyback-details-for-trade-to-earn-event)
**V. Terms and Conditions**
● $SUN will be distributed on the SunX platform. Users are recommended to participate via the TRON network. If other blockchains are chosen, SunX plans to launch a one-click $SUN-to-USDT exchange feature in Q4 2025. Stay tuned!
● Market makers are not eligible to participate in this event.
● During the event, there is a cap on the rewards that each participant can receive per hour. Participants will not be able to receive additional rewards if they reach their individual reward limit or if the overall prize pool limit is reached.
● Participants in the "Trade to Earn" event will receive a portion of their trading fees as a reward. No referral bonuses will be paid to the referrer until the prize pool is depleted, but all other trading-fee-based referral bonuses remain unaffected.
● Rewards earned from other concurrent trading events on SunX are distributed after deducting your Trade to Earn earnings.
● SunX reserves the right to disqualify users engaging in cheating and revoke their rewards.
● SunX reserves the right for final interpretation of this event.
Thank you for your support and trust. We eagerly anticipate your participation!
SunX Team
December 10, 2025
[PreviousDual Rewards for SunX Affiliates,Win a Limited-Time Extra 10% Bonus & Up to $2,800](https://sunx.gitbook.io/sunx/activity/dual-rewards-for-sunx-affiliates-win-a-limited-time-extra-10-bonus-and-up-to-usd2-800)
[Next14 Days Only: Share a Million-Dollar Airdrop for SunX Trial Bonus Launch](https://sunx.gitbook.io/sunx/activity/14-days-only-share-a-million-dollar-airdrop-for-sunx-trial-bonus-launch)
Last updated 28 days ago
---
# Dual Rewards for SunX Affiliates,Win a Limited-Time Extra 10% Bonus & Up to $2,800 | SunX
Event Period: 16:00 (UTC) on Nov 24 - 15:59 (UTC) on Dec 9
Eligibility: All SunX Affiliates
**How to Participate:** [**Contact your BD or just register for this event>>**](https://forms.gle/bnq77MxX4LPBr8Yj7)
The SunX Affiliate exclusive "Thanksgiving Feast" is live, offering dual rewards to warm your winter!
**\[Thanksgiving Referral Bonus\] Limited-Time +10% Bonus & Your Invitees Get $10**
Exclusive for affiliates: During the event, invite friends to register and trade, and get an extra 10% limited-time bonus!
Exclusive for invitees: Only the first 20 invitees of an affiliate will each receive a $10 bonus. First come, first served!
\*Only invitees who join SunX using your referral link or invitation code and achieve a trading volume of at least 50,000 USDT during the event are eligible.
**\[Thanksgiving Trading Bonus\] Share Up to $2,800 with Your Invitee!**
During the event, if the combined trading volume of you and your invitee reaches the required threshold, you can earn up to $2,800. This reward can be split between you and your invitee. The total prize pool is $20,000 and is available on a first-come, first-served basis.
Cumulative Trading Volume Requirement
Total Rewards
Affiliate Rewards
Invitees
Proportional Reward Sharing
60M USDT
$2,800
$1,400
$1,400
30M USDT
$1,400
$700
$700
15M USDT
$700
$350
$350
6M USDT
$300
$150
$150
3M USDT
$150
$75
$75
1M USDT
$50
$25
$25
\*During the event, you'll be eligible to share a prize pool upon reaching a cumulative trading volume of ≥10,000 USDT. Rewards from this event are not cumulative. Users will only receive the highest reward their trading volume qualifies them for.
**Terms and Conditions**
1\. Only trading volumes of trades whose fees have been paid are counted for this event. Any trading volume from SunX's "Trade to Earn" event is excluded.
2\. Participants cannot win rewards from both this event and other promotions of the same kind. If you qualify for multiple rewards, you will receive the highest reward applicable to you.
3\. Participants involved in using bots, cheating, or duplicate registration will be disqualified. Using multiple accounts will also result in disqualification from rewards.
\*SunX reserves the right for final interpretation of this event.
[PreviousSunX Embarks Anew|Invite Friends and Share 1 Million $SUN](https://sunx.gitbook.io/sunx/activity/sunx-embarks-anew-invite-friends-and-share-1-million-usdsun)
[Next$1.35M Rewards | Join "Trade to Earn" #2 on SunX](https://sunx.gitbook.io/sunx/activity/usd1.35m-rewards-or-join-trade-to-earn-2-on-sunx)
Last updated 1 month ago
---
# 14 Days Only: Share a Million-Dollar Airdrop for SunX Trial Bonus Launch | SunX
Dear SunX Users,
SunX is thrilled to announce the official launch of our new "Trial Bonus" feature and is celebrating with a 14-day airdrop event! Both new and existing users are invited to share a total prize pool of million-dollar trial bonuses.
**Event Period:** 16:00 (UTC) on Dec 12, 2025 - 15:59 (UTC) on Dec 26, 2025
**How to Get an Airdrop?**
Meet any one of the following three requirements to claim a 5 USDT Futures Trial Bonus.
1\. For Existing Traders: Reach a cumulative futures trading volume of ≥1,000 USDT between September 19, 2025 and 15:59 (UTC) on December 12, 2025.
2\. For Active Traders: Reach a cumulative futures trading volume of 5,000 USDT during the event.
3\. For New Users: Complete your first futures trade of ≥1,000 USDT during the event period.
**How to Participate?**
Fill out the [**form**](https://forms.gle/uZXCDtzSnX9TFJUX7)
to register for the event. The platform will automatically distribute an airdrop to every eligible user.
**Terms and Conditions:**
1\. The daily prize pool is set at 80,000 USDT in futures trial bonuses. The bonuses are distributed on a first-come, first-served basis according to the order in which conditions are met.
2\. Participants cannot win rewards from both this event and other promotions of the same kind.
3\. The USDT rewards are given in the form of trial bonuses. Rewards will be distributed to winners who do not claim their rewards every Monday, Wednesday, and Friday.
4\. Futures trial bonuses can be used to offset a portion of futures trading fees, funding fees, or position losses. Detailed usage rules are provided on the event page.
5\. The claim and usage validity period for a trial bonus is 3 days. Please claim and use it promptly.
6\. This event is not open to market makers. Participants involved in using bots, cheating, or duplicate registration will be disqualified. Using multiple accounts will also result in disqualification from rewards.
7\. Only trading volume with trading fees paid is counted towards this event. Trades with zero trading fees, negative maker fees, or trial bonuses are not included in the volume calculation for the event.
8\. SunX reserves the right for final interpretation of this event.
SunX Team
December 12, 2025
[Previous$1.35M Rewards | Join "Trade to Earn" #2 on SunX](https://sunx.gitbook.io/sunx/activity/usd1.35m-rewards-or-join-trade-to-earn-2-on-sunx)
[Next$315,000 Giveaway | Join "Trade to Earn" #3 on SunX](https://sunx.gitbook.io/sunx/activity/usd315-000-giveaway-or-join-trade-to-earn-3-on-sunx)
Last updated 26 days ago
---
# $315,000 Giveaway | Join "Trade to Earn" #3 on SunX | SunX
Dear SunX Users,
SunX is proud to launch the third phase of our "Trade to Earn" event. Following the successful conclusion of the first two phases and the continued trading momentum, we are introducing the “Trade to Earn” #3. During the event, users trading designated perpetual futures pairs will not only receive a full refund of their trading fees but also earn additional rewards.
The event rewards will be distributed in $SUN. All trading fees generated from registered participants trading the designated trading pairs during the event will be used for $SUN buybacks. This will provide you with an unprecedented opportunity for asset growth while ensuring stable $SUN appreciation.
[**Register Now>>**](https://www.sunperp.com/futures/mining/)
**I. Event Schedule**
● Event Period: 12:00:00 (UTC) on Jan 6, 2026 - 12:00:00 (UTC) on Jan 13, 2026
● The Trade to Earn event is on a daily basis. A day is defined from 12:00 (UTC) on Day T to 12:00 (UTC) on Day T+1.
● The daily prize pool is divided into 24 portions, with each portion released on the hour.
● Rewards are calculated and updated hourly. You can claim your $SUN rewards from the second hour after each session ends.
**II. Event Rules**
● Eligibility: Anyone who registers for the event.
● Applicable Trading Pairs: BTCUSDT, ETHUSDT, and SUNUSDT
● Prize Pools:
Symbol
Daily $SUN Prize Pool
Total $SUN Prize Pool
BTCUSDT
30,000 USDT
210,000 USDT
ETHUSDT
10,000 USDT
70,000 USDT
SUNUSDT
5,000 USDT
35,000 USDT
Total
45,000 USDT
315,000 USDT
l The daily prize pool for each pair has a fixed value in USDT, and the event will calculate the $SUN amount in each pool based on the $SUN price at the start of each session.
○ For instance, if the $SUN price is 0.02 USDT at 12:00 (UTC) on Day T when the event starts, and the prize pool of the hour (12:00 - 13:00) for BTCUSDT is 1,250 USDT, i.e., 62,500 $SUN (= 1,250 / 0.02).
**III. Reward Calculation**
● Reward Formula: Reward amount per trade = User's actual trading fees paid for the trade (USDT) \* Corresponding reward rate \* $SUN's price at the start of the session.
● Reward Rates:
○ Maker: 110%
○ Taker: 107%
● Hourly Reward Cap Per Participant:
Symbol
Hourly Reward Cap Per User ($SUN Equivalent)
BTCUSDT
200 USDT
ETHUSDT
100 USDT
SUNUSDT
100 USDT
Total
400 USDT
Example: Assume that the $SUN price is 0.02 USDT when the event starts at 12:00 (UTC) on Day T, and a participant generates 100 USDT fees by trading BTCUSDT between 12:00 (UTC) and 13:00 (UTC) on Day T. The order is a maker order, the fees are generated before the depletion of the prize pool, and the participant's reward cap is not reached.
The participant's reward earned from the order is: 100 \* 110% / 0.02 = 5,500 $SUN
The reward is updated and available for claim at 14:00 (UTC) on Day T.
**IV. $SUN Buyback and Burn Mechanism**
All net fees generated from registered participants trading the designated trading pairs during the event will be used for $SUN buybacks, ensuring stable appreciation of $SUN. $SUN buybacks take place on the HTX platform, and the repurchased $SUN will be entirely burnt, with the schedule at the end of each quarter. Specific timing will be announced separately.
To facilitate buyback calculations, the daily trading fee statistics period is set from 00:00 to 23:59 (UTC+8) each day. If the event starts at 20:00:00 (UTC+8) on Day T, the first trading fee calculation period will be from 00:00 (UTC+8) to 23:59 (UTC+8) on Day T+1. The buyback, based on trading fees generated on Day T+1, will be completed on Day T+2.
For the details of the daily buyback after the event starts, please refer to further announcements.
[$SUN Buyback Details for "Trade to Earn" Event](https://sunx.gitbook.io/sunx/activity/usdsun-buyback-details-for-trade-to-earn-event)
**V. Terms and Conditions**
● Winners' $SUN rewards will be distributed to SunX.
● Market makers are not eligible to participate in this event.
● During the event, there is a cap on the rewards that each participant can receive per hour. Participants will not be able to receive additional rewards if they reach their individual reward limit or if the overall prize pool limit is reached.
● Participants will receive their trading fees for the "Trade to Earn" event as a reward. Trades that receive rewards from "Trade to Earn" will not generate referral bonuses for their inviters, but all other trading fees remain unaffected.
● Rewards earned from other concurrent trading events on SunX are distributed after deducting your Trade to Earn earnings.
● SunX reserves the right to disqualify users engaging in cheating and revoke their rewards.
● SunX reserves the right for final interpretation of this event.
Thank you for your support and trust. We eagerly anticipate your participation!
SunX Team January 6, 2026
[Previous14 Days Only: Share a Million-Dollar Airdrop for SunX Trial Bonus Launch](https://sunx.gitbook.io/sunx/activity/14-days-only-share-a-million-dollar-airdrop-for-sunx-trial-bonus-launch)
[NextReferral Program](https://sunx.gitbook.io/sunx/points-and-rewards/referral-program)
Last updated 1 day ago
---
# Referral Program | SunX
**How It Works**
1\. Generate your invitation code on the Referral page and share it with your friends.
2\. Inviters can only customize their invitation code once.
3\. After the invitee completes signup, the information on the inviter's Referral page will be updated in real time.
4\. Both custom invitation codes and default invitation codes can be used unlimited times.
5\. Inviters earn a 15% referral bonus from their invitees' trading fees, while invitees enjoy a 5% discount on trading fees.
6\. Once the referral relationship is established, it cannot be changed, and there is no limit to the number of invitees.
7\. Referral bonus rates may be adjusted based on market conditions or platform policies. Users will be notified of any updates via announcements or direct notifications.
**Bonus Settlement and Tracking**
l Referral bonuses will be distributed in USDT to your account.
l Each trading fee generated by your invitee, except for those with negative fee rates, will earn you a corresponding referral bonus.
l Bonus amount (USDT) = Trading volume \* Trading fee rate \* Bonus rate.
l You can view your full bonus history on the Referral page.
l The referral bonus data is updated based on the UTC+8 time zone, and enters a maintenance period daily after 20:00. Data during maintenance per day is based on prior-day assets and may show slight discrepancies or delays.
**Terms**
l If an invitee violates any referral bonus risk management rule, their inviter will not receive the bonus. In addition, the invitee's referral status will be marked as \[Invalid\], and any generated bonus records will be marked as \[Invalid bonus\].
l Only new users who sign up using your referral link are eligible.
l Self-referrals (creating multiple accounts to invite yourself) are not allowed. If detected, all referral bonuses will be revoked.
l Offensive, misleading, or harmful custom invitation codes may result in removal from the program and cancellation of bonuses.
l The referrer acts independently and is responsible for understanding the risks and legal implications of promoting futures trading in their region.
l SunX may extend the validity period of referrals at its discretion.
l SunX reserves the right to modify bonus rates, program rules, or cancel the referral program at any time.
l SunX also reserves the right to interpret the terms of the program.
[Previous$315,000 Giveaway | Join "Trade to Earn" #3 on SunX](https://sunx.gitbook.io/sunx/activity/usd315-000-giveaway-or-join-trade-to-earn-3-on-sunx)
[NextHow to get or bind the referral code?](https://sunx.gitbook.io/sunx/points-and-rewards/how-to-get-or-bind-the-referral-code)
Last updated 1 month ago
---
# How to get or bind the referral code? | SunX
**How to get the referral code?**
1\. Open the [Sunx website and go to the Referral page](https://www.sunperp.com/futures/invite/)
, then click “Connect Wallet”;
\*SunX currently supports Tronlink, Bitget Wallet, OKX Wallet, TokenPocket, and Binance Wallet.

**2\. Once a wallet is connected, a default referral code will be automatically generated.**
Users can upgrade their default referral code to a custom one consisting of 5–12 letters or a combination of letters and numbers. This helps improve shareability and strengthen personal branding. Once created, the custom code cannot be modified or deleted, so please set it carefully.

**How to share the referral code?**
Share your referral link or code with friends through the following methods. When your friend accepts the invitation, both parties will share 20% commission.
The inviter will earn a 15% commission on fees from the invitee’s trades and the invitee will enjoy a 5% rebate on trading fees.
1\. After connecting your wallet, go to the Referral page to directly copy and share your referral code.
2\. Guide your friends to bind the referral code manually: Ask your friends to go to the [Referral page >> Bind Inviter](https://www.sunperp.com/futures/invite/)
, enter your code manually and complete the binding.

**How to view referral relationships and commission?**
When your invited friend binds your referral code and completes a transaction on SunX, you will receive your commission before 12:00 (UTC) on the following day. All commission details can be viewed on the [Referral page](https://www.sunperp.com/zh-cn/futures/invite/)
.
\*Notes: During the daily maintenance period, displayed data is based on the previous day’s asset status, so slight discrepancies or temporary delays may occur.

**How can invitees accept an invitation?**
Invitees can accept an invitation and enjoy a 5% rebate on trading fees through either of the following methods:
**1\. Bind a wallet via the referral link**
After opening the referral link, click “Connect Wallet”, select a wallet to connect, and complete the connection to enjoy a 5% rebate on trading fees.

**2\. Bind a referral code on the Referral page**
If the wallet was not connected through the referral link, the user can go to the Referral page >> Bind Inviter and enter the referral code to establish the referral relationship.

**Notes:**
● The rules and details of the SunX Referral Reward Program may be adjusted as needed and SunX reserves the right to update the program terms in response to market changes.
● Any form of abuse such as self-invitation, offline rebates, or other improper use is strictly prohibited. SunX reserves the right to restrict or revise participation conditions in such cases.
[PreviousReferral Program](https://sunx.gitbook.io/sunx/points-and-rewards/referral-program)
[NextSunX Affiliate Referral Program](https://sunx.gitbook.io/sunx/points-and-rewards/sunx-affiliate-referral-program)
Last updated 1 month ago
---
# SunX Affiliate Referral Program | SunX
1\. SunX Commission Rate Tiers and Assessment Criteria
The SunX platform categorizes affiliate commissions into three tiers based on the percentage of commissions an inviter can earn, with higher tiers offering higher rates. To qualify for a specific tier, an inviter must meet any one of the "Inviter Requirements" and contact their business manager. See the table below for details:
Tier
Commission Rate
Inviter Requirements (Meeting Any of the Three Criteria)
Invitee Requirement
Level 1
30%
1\. Individual Trading Volume: 30-day weighted trading volume ≥$500,000
2\. Team Size: Cumulative referrals ≥10 invitees (with ≥5 active traders in a natural month)
3\. Trading Volume Scale: Natural month trading volume ≥$1,000,000
No specific requirement
Level 2
40%
1\. Individual Trading Volume: 30-day weighted trading volume ≥$2,500,000
2\. Team Size: Cumulative referrals ≥20 invitees (with ≥5 active traders in a natural month, including at least 1 reaching VIP2)
3\. Trading Volume Scale: Natural month trading volume ≥$5,000,000
Invitee must be VIP2 (30-day weighted trading volume ≥$1,000,000)
Level 3
50%
1\. Individual Trading Volume: 30-day weighted trading volume ≥$5,000,000
2\. Team Size: Cumulative referrals ≥50 invitees (with ≥10 active traders in a natural month, including at least 3 reaching VIP2 or 1 reaching VIP3)
3\. Trading Volume Scale: Natural month trading volume ≥$10,000,000
1\. Invitee must be VIP2 (30-day weighted trading volume ≥$1,000,000), or 2. Invitee must be VIP3 (30-day weighted trading volume ≥$5,000,000)
2\. Commission Rate Tiers Adjustment (Upgrade & Downgrade)
Assessment Cycle: SunX will evaluate all Affiliates monthly. The evaluation criteria will be based on the requirements necessary to reach each commission tier.
Upgrade: The monthly assessment begins at 00:00:00 (UTC+8) on the first day of each calendar month. The affiliate's cumulative data will be evaluated, and their commission tier will be updated within the first business week of the following month. If an Affiliate meets the criteria for a higher tier, they will be upgraded and receive the corresponding commission rate, capped at 50%.
Example: If you are a Level 2 Inviter (40% commission) in October and meet any Level 3 criteria during that month's assessment, you will be upgraded to Level 3 (50% commission) within the first business week in November.
Downgrade: The monthly assessment begins at 00:00:00 (UTC+8) on the first day of each calendar month. The affiliate's cumulative data will be evaluated, and their commission tier will be updated within the first business week of the following month. If an affiliate fails to meet the requirements of their current tier during the assessment, their level will be downgraded to the highest tier they still qualify for. After the downgrade, invitees' discount rates remain unchanged, while the affiliate's commission rate adjusts to the new tier.
Example: If you are a Level 2 Inviter (40% commission) in October but fail to meet any Level 2 criteria, you will be downgraded to Level 1 (30% commission) within the first business week in November.
3\. VIP Client Commission Retention Rate
Bonus Amount (USDT) = Trading Volume \* Trading Fee Rate \* Commission Rate \* Inviter Retention Rate
SunX VIP Tier
30D Weighted Trading Volume ($)
Inviter Retention Rate (Amount Kept)
1
≤1,000,000
100%
2
\>1,000,000
100%
3
\>5,000,000
90%
4
\>25,000,000
80%
5
\>100,000,000
70%
6
\>500,000,000
60%
4\. Resolving Commission Overlaps Between Affiliates and Brokers
If a user with an existing upline inviter places an order using a broker ID other than their inviter's, 30% of the commission will go to the broker, and the remaining 70% will still be paid to the user's upline inviter.
5\. Terms and Conditions:
l Commission settlement and distribution occur daily between 20:00–21:00 (UTC+8) on the T+1 day.
l All SunX referral relationships are permanently valid by default.
l There is no limit to the number of invitees you can refer.
l Only new users who register via your referral link are eligible.
l Self-referrals (creating multiple accounts to invite yourself) are prohibited. If detected, all referral bonuses will be revoked.
l SunX commission rules are subject to updates.
l SunX reserves the right to modify program rules or cancel the referral program at any time.
l SunX reserves the right for final interpretation of this program.
[PreviousHow to get or bind the referral code?](https://sunx.gitbook.io/sunx/points-and-rewards/how-to-get-or-bind-the-referral-code)
[NextIntroduction](https://sunx.gitbook.io/sunx/developer/introduction)
Last updated 1 month ago
---
# Quick start | SunX
[Preparation](https://sunx.gitbook.io/sunx/developer/quick-start/preparation)
[Interface Type](https://sunx.gitbook.io/sunx/developer/quick-start/interface-type)
[Authentication](https://sunx.gitbook.io/sunx/developer/quick-start/authentication)
[WebSocket Heartbeat](https://sunx.gitbook.io/sunx/developer/quick-start/websocket-heartbeat)
[PreviousIntroduction](https://sunx.gitbook.io/sunx/developer/introduction)
[NextPreparation](https://sunx.gitbook.io/sunx/developer/quick-start/preparation)
---
# Rest | SunX
[Basic Information](https://sunx.gitbook.io/sunx/developer/rest/basic-information)
[Account](https://sunx.gitbook.io/sunx/developer/rest/account)
[Order](https://sunx.gitbook.io/sunx/developer/rest/order)
[Position](https://sunx.gitbook.io/sunx/developer/rest/position)
[Market Data](https://sunx.gitbook.io/sunx/developer/rest/market-data)
[Wallet](https://sunx.gitbook.io/sunx/developer/rest/wallet)
[PreviousOrder Push Heartbeat](https://sunx.gitbook.io/sunx/developer/quick-start/websocket-heartbeat/order-push-heartbeat)
[NextBasic Information](https://sunx.gitbook.io/sunx/developer/rest/basic-information)
---
# Websocket Subscription | SunX
[Private Channel](https://sunx.gitbook.io/sunx/developer/websocket-subscription/private-channel)
[Public Channel](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel)
[PreviousGet Deposit & Withdraw records](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records)
[NextPrivate Channel](https://sunx.gitbook.io/sunx/developer/websocket-subscription/private-channel)
---
# Websocket Trading | SunX
[Ws Place batch orders](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders)
[Ws Cancel batch Orders](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders)
[PreviousSubscribe Index Kline Data](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data)
[NextWs Place batch orders](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders)
---
# Error code | SunX
Error Code
Error Description
500
System error
1010
The user does not exist.
1066
This field cannot be left empty.
1067
Invalid field
4010
Deduction is not yet enabled.
4012
The crypto is unavailable for deduction.
4014
Setting fee deduction is temporarily unavailable. Please contact your account manager for assistance.
6001
The Single-Asset Collateral mode is temporarily unavailable.
6002
The Multi-Assets Collateral mode is temporarily unavailable.
6003
Update your app to the latest version to use the Multi-Assets Collateral mode.
6004
Switching margin mode is unavailable due to ADL.
6005
Switching margin mode is unavailable due to liquidation.
6006
Switching margin mode is unavailable as trading is disabled.
6007
Switching...
6008
Failed to switch your collateral mode.
6009
Switching mode is unavailable due to negative equity.
6010
The current margin mode is as you required.
6011
Placing orders is unavailable due to ADL or liquidation.
6012
Your account is in liquidation or ADL. Please retry later.
6013
The position is in liquidation or ADL. Please retry later.
6014
Multi-Assets Collateral mode is currently unavailable. For any questions, please contact customer service.
6015
Opening positions under the Multi-Assets Collateral mode is currently unavailable. For any questions, please contact customer service.
6016
Closing positions under the Multi-Assets Collateral mode is currently unavailable. For any questions, please contact customer service.
14610
The size of a long position cannot exceed {0} {1}. Please retry.
14620
The size of a short position cannot exceed {0} {1}. Please retry.
4013
The current Futures Grid is being retired soon. To create new grids, please go to Trading Bots and experience our new Futures Grid.
50222
This service is unavailable for Fireblocks sub-accounts.
50224
Unavailable
50225
Please create a Fireblocks CVA address.
50226
The feature is temporarily unavailable for custodial sub-accounts.
[PreviousWs Cancel batch Orders](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders)
[NextMedia Kit](https://sunx.gitbook.io/sunx/brand/media-kit)
Last updated 3 months ago
---
# Media Kit | SunX
Please follow these guidelines when using SunX brand assets:
All SunX brand assets are copyrighted materials. Please get approval from SunX before using them.
Where possible, hyperlink our brand assets to SunX's official website and social media channels like X (Twitter).
Use our brand assets when announcing official partnerships.
Avoid the following:
Don't use SunX brand assets for promoting your own project, especially without our consent.
Don't repurpose any SunX brand elements (logos, visuals, colors, etc.).
Get in touch
For any questions about using SunX 's brand assets, or for partnerships, brokerage inquiries, influencer collaborations, or referral opportunities, please contact support@sunx.io.
**Brand color codes**


SunX **Hero Patterns:**


SunX **logo:**


12KB
[logo svg.rar](https://3599393801-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLJp5Dq9Iikvq07PruZg8%2Fuploads%2FNs7OHZVP4nPJACl9gJ4K%2Flogo%20svg.rar?alt=media&token=904f6ae7-f355-42b7-b872-7a487d2e9b69)
Download[Open](https://3599393801-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLJp5Dq9Iikvq07PruZg8%2Fuploads%2FNs7OHZVP4nPJACl9gJ4K%2Flogo%20svg.rar?alt=media&token=904f6ae7-f355-42b7-b872-7a487d2e9b69)
**SunX Mark:**


63KB
[Mark.zip](https://3599393801-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLJp5Dq9Iikvq07PruZg8%2Fuploads%2FCWk9yv4YAx7gVPKhQ0wi%2FMark.zip?alt=media&token=6f44526f-fa24-42ed-9636-a98a00e4372b)
archive
Download[Open](https://3599393801-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLJp5Dq9Iikvq07PruZg8%2Fuploads%2FCWk9yv4YAx7gVPKhQ0wi%2FMark.zip?alt=media&token=6f44526f-fa24-42ed-9636-a98a00e4372b)
SunX **logo No Usage:**


[PreviousError code](https://sunx.gitbook.io/sunx/developer/error-code)
[NextSocial Media](https://sunx.gitbook.io/sunx/about-us/social-media)
Last updated 1 month ago
---
# Social Media | SunX
Telegram:[https://t.me/SunX\_DEX](https://t.me/SunX_DEX)
Discord:[https://discord.com/invite/Az4jUBGf3E](https://discord.com/invite/Az4jUBGf3E)
SunX X:[https://x.com/SunX\_DEX](https://x.com/SunX_DEX)
Tiktok:[https://www.tiktok.com/@sunx\_dex](https://www.tiktok.com/@sunx_dex)
Email:[support@sunx.io](mailto:support@sunx.io)
[PreviousMedia Kit](https://sunx.gitbook.io/sunx/brand/media-kit)
[NextTerms of Service](https://sunx.gitbook.io/sunx/about-us/terms-of-service)
Last updated 1 month ago
---
# Terms of Service | SunX
[https://sun.io/docs/SUN\_Terms\_of\_Use\_en.pdf](https://sun.io/docs/SUN_Terms_of_Use_en.pdf)
[PreviousSocial Media](https://sunx.gitbook.io/sunx/about-us/social-media)
[NextPrivacy Policy](https://sunx.gitbook.io/sunx/about-us/privacy-policy)
---
# Privacy Policy | SunX
[https://sun.io/docs/SUN\_Privacy\_Policy\_en.pdf](https://sun.io/docs/SUN_Privacy_Policy_en.pdf)
[PreviousTerms of Service](https://sunx.gitbook.io/sunx/about-us/terms-of-service)
---
# Preparation | SunX
Before you use API, you need to login the website to create API Key with proper permissions. The API key is shared for all instruments in SunX including spot, futures, swap, options.
You can manage your API Keys [here](https://www.sunperp.com/futures/api-manage/)
.
Every user can create at most 20 API Keys, each can be applied with either permission below:
* Read permission: It is used to query the data, such as order query, trade query.
* Trade permission: It is used to create order, cancel order and transfer, etc.
* Withdraw permission: It is used to create withdraw order, cancel withdraw order, etc.
Please remember below information after creation:
* `Access Key` It is used in API request
* `Secret Key` It is used to generate the signature (only visible once after creation)
The API Key can bind maximum 20 IP addresses (either host IP or network IP), we strongly suggest you bind IP address for security purpose. The API Key without IP binding will be expired after 90 days.**Warning** : These two keys are important to your account safety, please don't share **both** of them together to anyone else . If you find your API Key is disposed, please remove it immediately.
[PreviousQuick start](https://sunx.gitbook.io/sunx/developer/quick-start)
[NextInterface Type](https://sunx.gitbook.io/sunx/developer/quick-start/interface-type)
Last updated 1 month ago
---
# Interface Type | SunX
There are two types of interface, you can choose the proper one according to your scenario and preferences.
####
[](https://sunx.gitbook.io/sunx/developer/quick-start/interface-type#rest-api)
REST API
REST (Representational State Transfer) is one of the most popular communication mechanism under HTTP, each URL represents a type of resource.
It is suggested to use Rest API for one-off operation, like trading and withdraw.
####
[](https://sunx.gitbook.io/sunx/developer/quick-start/interface-type#websocket-api)
WebSocket API
WebSocket is a new protocol in HTML5. It is full-duplex between client and server. The connection can be established by a single handshake, and then server can push the notification to client actively.
It is suggest to use WebSocket API to get data update, like market data and order update.
**Authentication**
Both API has two levels of authentication:
Public API: It is for basic information and market data. It doesn't need authentication.
Private API: It is for account related operation like trading and account management. Each private API must be authenticated with API Key.
[PreviousPreparation](https://sunx.gitbook.io/sunx/developer/quick-start/preparation)
[NextAuthentication](https://sunx.gitbook.io/sunx/developer/quick-start/authentication)
Last updated 3 months ago
---
# WebSocket Heartbeat | SunX
[Market Heartbeat](https://sunx.gitbook.io/sunx/developer/quick-start/websocket-heartbeat/market-heartbeat)
[Order Push Heartbeat](https://sunx.gitbook.io/sunx/developer/quick-start/websocket-heartbeat/order-push-heartbeat)
[PreviousAuthentication](https://sunx.gitbook.io/sunx/developer/quick-start/authentication)
[NextMarket Heartbeat](https://sunx.gitbook.io/sunx/developer/quick-start/websocket-heartbeat/market-heartbeat)
---
# Authentication | SunX
####
[](https://sunx.gitbook.io/sunx/developer/quick-start/authentication#overview)
Overview
The API request may be tampered during internet, therefore all private API must be signed by your API Key (Secrete Key).
Each API Key has permission property, please check the API permission, and make sure your API key has proper permission.
A valid request consists of below parts:
* API Path: for example api.sunx.io/sapi/v1/trade/order
* API Access Key: The 'Access Key' in your API Key
* Signature Method: The first one is for users to use the elliptic curve digital signature algorithm, using Ed25519. The second, hash-based protocol for user-computed signatures, uses HmacSHA256.
* Ed25519 introduction: It is a high-performance digital signature algorithm that provides fast signature verification and generation while having high security.
* Signature Version: The version for the signature protocol, it uses **2**
* Timestamp: The UTC time when the request is sent, e.g. 2017-05-11T16:22:06. It is useful to prevent the request to be intercepted by third-party.
* Parameters: Each API Method has a group of parameters, you can refer to detailed document for each of them.
* For GET request, all the parameters must be signed.
* For POST request, the parameters needn't be signed and they should be put in request body.
* Signature: The value after signed, it is guarantee the signature is valid and the request is not be tempered.
####
[](https://sunx.gitbook.io/sunx/developer/quick-start/authentication#undefined)
####
[](https://sunx.gitbook.io/sunx/developer/quick-start/authentication#ed25519-signature-method)
Ed25519 Signature Method
The signature may be different if the request text is different, therefore the request should be normalized before signing. Below signing steps take the order query as an example:
This is a full URL to query one order:
[https://api.sunx.io/sapi/v1/trade/order?](https://api.sunx.io/sapi/v1/trade/order?)
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`&SignatureMethod=Ed25519`
`&SignatureVersion=2`
`&Timestamp=2017-05-11T15:19:30`
`&order_id=1234567890`
**1\. The request Method (GET or POST, WebSocket use GET), append line break "\\n"**
`GET\n`
**2\. The host with lower case, append line break "\\n"**
`Example:api.sunx.io\n`
**3\. The path, append line break "\\n"**
For example, query orders:
`/sapi/v1/trade/order\n`
`For example, WebSocket v1`
`/ws/v1`
**4\. The parameters are URL encoded, and ordered based on ASCII**
For example below is the original parameters:
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`order_id=1234567890`
`SignatureMethod=Ed25519`
`SignatureVersion=2`
`Timestamp=2017-05-11T15%3A19%3A30`
Use UTF-8 encoding and URL encoded, the hex must be upper case. For example, The semicolon ':' should be encoded as '%3A', The space should be encoded as '%20'.The 'timestamp' should be formated as 'YYYY-MM-DDThh:mm:ss' and URL encoded. The value is valid within 5 minutes.
Then above parameter should be ordered like below:
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`SignatureMethod=Ed25519`
`SignatureVersion=2`
`Timestamp=2017-05-11T15%3A19%3A30`
`order_id=1234567890`
**5\. Use char "&" to concatenate all parameters**
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=Ed25519&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&order_id=1234567890`
**6\. Assemble the pre-signed text**
`GET\n`
`api.sunx.io\n`
`/sapi/v1/trade/order\n`
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&order_id=1234567890`
**7\. Use the pre-signed text and your Secret Key to generate a signature**
* Use the request string obtained in the previous step to generate the private key of Ed25519 and add it to generate a signature.
* Encode the generated signature with base-64, and the resulting value is used as the digital signature of this interface call.
`4F65x5A2bLyMWVQj3Aqp+B4w+ivaA7n5Oi2SuYtCJ9o=`
**8\. Put the signature into request URL**
For Rest interface:
1. Put all the parameters in the URL
2. Encode signature by URL encoding and append in the URL with parameter name "Signature".
Finally, the request sent to API should be:
[https://api.sunx.io/sapi/v1/trade/order?AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&order\_id=1234567890&SignatureMethod=Ed25519&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&Signature=4F65x5A2bLyMWVQj3Aqp%2BB4w%2BivaA7n5Oi2SuYtCJ9o%3D](https://api.sunx.io/sapi/v1/trade/order?AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&order_id=1234567890&SignatureMethod=Ed25519&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&Signature=4F65x5A2bLyMWVQj3Aqp%2BB4w%2BivaA7n5Oi2SuYtCJ9o%3D)
For WebSocket interface:
1. Fill the value according to required JSON schema
2. The value in JSON doesn't require URL encode
For example:
Private channel subscription:
####
[](https://sunx.gitbook.io/sunx/developer/quick-start/authentication#hmacsha256-signature-method)
`HmacSHA256` Signature Method
The signature may be different if the request text is different, therefore the request should be normalized before signing. Below signing steps take the order query as an example:
This is a full URL to query one order:
[https://api.sunx.io/sapi/v1/trade/order?](https://api.sunx.io/sapi/v1/trade/order?)
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`&SignatureMethod=HmacSHA256`
`&SignatureVersion=2`
`&Timestamp=2017-05-11T15:19:30`
`&order_id=1234567890`
**1\. The request Method (GET or POST, WebSocket use GET), append line break "\\n"**
`GET\n`
**2\. The host with lower case, append line break "\\n"**
`Example:api.sunx.io\n`
**3\. The path, append line break "\\n"**
For example, query orders:
`/sapi/v1/trade/order\n`
`For example, WebSocket v2`
`/ws/v2`
**4\. The parameters are URL encoded, and ordered based on ASCII**
For example below is the original parameters:
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`order_id=1234567890`
`SignatureMethod=HmacSHA256`
`SignatureVersion=2`
`Timestamp=2017-05-11T15%3A19%3A30`
Use UTF-8 encoding and URL encoded, the hex must be upper case. For example, The semicolon ':' should be encoded as '%3A', The space should be encoded as '%20'.The 'timestamp' should be formated as 'YYYY-MM-DDThh:mm:ss' and URL encoded. The value is valid within 5 minutes.
Then above parameter should be ordered like below:
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx`
`SignatureMethod=HmacSHA256`
`SignatureVersion=2`
`Timestamp=2017-05-11T15%3A19%3A30`
`order_id=1234567890`
**5\. Use char "&" to concatenate all parameters**
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&order_id=1234567890`
**6\. Assemble the pre-signed text**
`GET\n`
`api.sunx.io\n`
`/sapi/v1/trade/order\n`
`AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&order_id=1234567890`
**7\. Use the pre-signed text and your Secret Key to generate a signature**
* Use the pre-signed text in step 6 and your API Secret Key to generate hash code by HmacSHA256 hash function.
* Encode the hash code with base-64 to generate the signature.
`4F65x5A2bLyMWVQj3Aqp+B4w+ivaA7n5Oi2SuYtCJ9o=`
**8\. Put the signature into request URL**
For Rest interface:
1. Put all the parameters in the URL
2. Encode signature by URL encoding and append in the URL with parameter name "Signature".
Finally, the request sent to API should be:
[https://api.sunx.com/sapi/sapi/v1/trade/order?AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&order\_id=1234567890&SignatureMethod=Ed25519&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&Signature=4F65x5A2bLyMWVQj3Aqp%2BB4w%2BivaA7n5Oi2SuYtCJ9o%3D](https://api.sunx.com/sapi/sapi/v1/trade/order?AccessKeyId=e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx&order_id=1234567890&SignatureMethod=Ed25519&SignatureVersion=2&Timestamp=2017-05-11T15%3A19%3A30&Signature=4F65x5A2bLyMWVQj3Aqp%2BB4w%2BivaA7n5Oi2SuYtCJ9o%3D)
For WebSocket interface:
1. Fill the value according to required JSON schema
2. The value in JSON doesn't require URL encode
For example:
Private channel subscription:
[PreviousInterface Type](https://sunx.gitbook.io/sunx/developer/quick-start/interface-type)
[NextWebSocket Heartbeat](https://sunx.gitbook.io/sunx/developer/quick-start/websocket-heartbeat)
Last updated 1 month ago
Copy
{
"SignatureVersion": "2",
"op": "auth",
"AccessKeyId": "e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx",
"Signature": "4F65x5A2bLyMWVQj3Aqp+B4w+ivaA7n5Oi2SuYtCJ9o=",
"SignatureMethod": "Ed25519",
"type": "api",
"Timestamp": "2025-09-27T11:14:48"
}
Copy
{
"SignatureVersion": "2",
"op": "auth",
"AccessKeyId": "e2xxxxxx-99xxxxxx-84xxxxxx-7xxxx",
"Signature": "4F65x5A2bLyMWVQj3Aqp+B4w+ivaA7n5Oi2SuYtCJ9o=",
"SignatureMethod": "HmacSHA256",
"type": "api",
"Timestamp": "2025-09-27T11:14:48"
}
---
# Basic Information | SunX
[Get Contract Info](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info)
[Get Swap Index Price Information](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information)
[Get Futures Risk Limit](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit)
[Get funding rate](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate)
[Get historical funding rate](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate)
[Get Swap Price Limitation](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation)
[Assets Available for Multi-Assets Collateral mode](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode)
[PreviousRest](https://sunx.gitbook.io/sunx/developer/rest)
[NextGet Contract Info](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info)
---
# Account | SunX
[Get Account Balance](https://sunx.gitbook.io/sunx/developer/rest/account/get-account-balance)
[Get trading bills](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills)
[Get information on swap trading fee](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee)
[PreviousAssets Available for Multi-Assets Collateral mode](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode)
[NextGet Account Balance](https://sunx.gitbook.io/sunx/developer/rest/account/get-account-balance)
---
# Order Push Heartbeat | SunX
WebSocket API supports one-way heartbeat. The Server initiates ping message and the Client will return pong message. The Server sends back a heartbeat:
Copy
{
"op": "ping",
"ts": "1492420473058"
}
* WebSocket Client should return:
Copy
{
"op": "pong",
"ts": "1492420473058"
}
####
[](https://sunx.gitbook.io/sunx/developer/quick-start/websocket-heartbeat/order-push-heartbeat#note-94)
Note
* "ts" value in the return "pong" message is the "ts" value from "ping" push Once the WebSocket Client and WebSocket Server connected, Websocket Server will send a heartbeat every 5 seconds (the frequency might change) to Wesocket Client. If WebSocket Client ignores the heartbeat message for 5 times, it will get disconnected with Websocket Sever automatically. Under abnormal conditions, WebSocket Server will return error message like:
Copy
{
"op": "pong"
"ts": "1492420473027",
"err-code": 2011,
"err-msg": “detailed error message”
}
* Websocket Server disconnects automatically During period of building connection and authentication, Websocket Server will disconnect automatically if there is any error. The data structure before closing pushing are as below:
* Server return error but remain connection After successful authentication, Server will return error but not disconnect if Client provides illegal Op or there is any internal error.
[PreviousMarket Heartbeat](https://sunx.gitbook.io/sunx/developer/quick-start/websocket-heartbeat/market-heartbeat)
[NextRest](https://sunx.gitbook.io/sunx/developer/rest)
Last updated 2 months ago
Copy
{
"op": "close", // indicate Websocket Server disconnected automatically
"ts": long // The local timestamp of Server push
}
Copy
{
"op": "error", // indicate that receive illegal Op or internal error
"ts": long// The local timestamp of Server push
}
---
# Wallet | SunX
[Create a Withdraw Request](https://sunx.gitbook.io/sunx/developer/rest/wallet/create-a-withdraw-request)
[Confirm a Withdraw Request](https://sunx.gitbook.io/sunx/developer/rest/wallet/confirm-a-withdraw-request)
[Get Deposit & Withdraw records](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records)
[PreviousGet Estimated Funding Rate Kline Data](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-estimated-funding-rate-kline-data)
[NextCreate a Withdraw Request](https://sunx.gitbook.io/sunx/developer/rest/wallet/create-a-withdraw-request)
---
# Position | SunX
[Get Current Position](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position)
[Get Leverage List](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list)
[Set Leverage](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage)
[Get Position Mode](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode)
[Set Position Mode](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode)
[Get Futures Risk Limit](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit)
[Get Information On Position Limit](https://sunx.gitbook.io/sunx/developer/rest/position/get-information-on-position-limit)
[PreviousGet swap information on order limit](https://sunx.gitbook.io/sunx/developer/rest/order/get-swap-information-on-order-limit)
[NextGet Current Position](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position)
---
# Order | SunX
[Place Order](https://sunx.gitbook.io/sunx/developer/rest/order/place-order)
[Place Multiple Orders](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders)
[Cancel Order](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order)
[Cancel Multiple Orders](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders)
[Cancel All](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all)
[Close All of a Symbol at Market Price](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price)
[Close All at Market Price](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-at-market-price)
[Get Current Orders](https://sunx.gitbook.io/sunx/developer/rest/order/get-current-orders)
[Get Execution Details (last 3 days)](https://sunx.gitbook.io/sunx/developer/rest/order/get-execution-details-last-3-days)
[Get Order History](https://sunx.gitbook.io/sunx/developer/rest/order/get-order-history)
[Get Order Info](https://sunx.gitbook.io/sunx/developer/rest/order/get-order-info)
[Get swap information on order limit](https://sunx.gitbook.io/sunx/developer/rest/order/get-swap-information-on-order-limit)
[PreviousGet information on swap trading fee](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee)
[NextPlace Order](https://sunx.gitbook.io/sunx/developer/rest/order/place-order)
---
# Market Data | SunX
[Get Market Depth](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth)
[Get KLine Data](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data)
[Get Market Data Overview](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview)
[Get The Last Trade of a Contract](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-the-last-trade-of-a-contract)
[Get Market BBO Data](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data)
[Get a Batch of Trade Records of a Contract](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-a-batch-of-trade-records-of-a-contract)
[Get Kline Data of Mark Price](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data-of-mark-price)
[Get Premium Index Kline Data](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-premium-index-kline-data)
[Get Estimated Funding Rate Kline Data](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-estimated-funding-rate-kline-data)
[PreviousGet Information On Position Limit](https://sunx.gitbook.io/sunx/developer/rest/position/get-information-on-position-limit)
[NextGet Market Depth](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth)
---
# Private Channel | SunX
[Subscribe to data of account-related changes](https://sunx.gitbook.io/sunx/developer/websocket-subscription/private-channel/subscribe-to-data-of-account-related-changes)
[Subscribe to data of position changes](https://sunx.gitbook.io/sunx/developer/websocket-subscription/private-channel/subscribe-to-data-of-position-changes)
[Subscribe to match order data](https://sunx.gitbook.io/sunx/developer/websocket-subscription/private-channel/subscribe-to-match-order-data)
[Subscribe to data of execution changes](https://sunx.gitbook.io/sunx/developer/websocket-subscription/private-channel/subscribe-to-data-of-execution-changes)
[Subscribe to order data](https://sunx.gitbook.io/sunx/developer/websocket-subscription/private-channel/subscribe-to-order-data)
[PreviousWebsocket Subscription](https://sunx.gitbook.io/sunx/developer/websocket-subscription)
[NextSubscribe to data of account-related changes](https://sunx.gitbook.io/sunx/developer/websocket-subscription/private-channel/subscribe-to-data-of-account-related-changes)
---
# Public Channel | SunX
[Subscribe market BBO data push](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-market-bbo-data-push)
[Subscribe Market Depth Data](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-market-depth-data)
[Subscribe Incremental Market Depth Data](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-incremental-market-depth-data)
[Subscribe Kline data](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-kline-data)
[Request Trade Detail Data](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/request-trade-detail-data)
[Subscribe Index Kline Data](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data)
[PreviousSubscribe to order data](https://sunx.gitbook.io/sunx/developer/websocket-subscription/private-channel/subscribe-to-order-data)
[NextSubscribe market BBO data push](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-market-bbo-data-push)
---
# Get Deposit & Withdraw records | SunX
/sapi/v1/sunperp/dw/query/deposit-withdraw
Request type: GET
Signature verification: Yes
Interface permission: Read
Rate Limit: 20 times/2s
Interface description: Parent user and sub user search for all existed withdraws and deposits and return their latest status.
###
[](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
currency
string
false
The crypto currency to withdraw or deposit
When currency is not specified, the response would include the records of ALL currencies.
type
string
true
Define transfer type to search
deposit, withdraw
deposit, withdraw, sub user can only use deposit
from
string
false
The transfer id to begin search
When 'from' is not specified, the default value would be 1 if 'direct' is 'prev' with the response in ascending order, the default value would be the ID of latest record if 'direct' is 'next' with the response in descending order.
size
string
false
The number of items to return
\[1-50\]
50
direct
string
false
the order of response
'prev' (ascending), 'next' (descending)
'next'
###
[](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
status
string
true
Request Processing Result
error-code
string
false
Error code for withdrawal failure, only returned when the type is "withdraw" and the state is "reject", "wallet-reject" and "failed".
error-msg
string
false
Error description of withdrawal failure, only returned when the type is "withdraw" and the state is "reject", "wallet-reject" and "failed".
object
true
id
long
true
Transfer id
type
string
true
Define transfer type to search, possible values: \[deposit, withdraw\] Sub-user can only put "deposit"
currency
string
true
The crypto currency to withdraw
tx-hash
string
true
The on-chain transaction hash. If this is a "fast withdraw", then it is not on-chain transfer, and this value is empty.
chain
string
true
Block chain name
amount
float
true
The number of crypto asset transfered in its minimum unit
address
string
true
The deposit or withdraw target address
address-tag
string
true
The user defined address tag
fee
float
true
Withdrawal fee
state
string
true
deposit state
\[unknown:On-chain transfer has not been received,confirming:On-chain transfer waits for first confirmation,confirmed:On-chain transfer confirmed for at least one block, user is able to transfer and trade,safe:Multiple on-chain confirmed, user is able to withdraw,orphan:On-chain transfer confirmed but currently in an orphan branch\];withdraw state\[verifying:Awaiting verification,failed;verification failed,submitted:Withdraw request submitted successfully,reexamine:Under examination for withdraw validation,canceled:Withdraw canceled by user,pass:Withdraw validation passed,reject:Withdraw validation rejected,pre-transfer:Withdraw is about to be released,wallet-transfer:On-chain transfer initiated,wallet-reject:Transfer rejected by chain,confirmed;On-chain transfer completed with one confirmation,confirm-error:On-chain transfer faied to get confirmation,repealed:Withdraw terminated by system,risk-action-fail:Risk control verification failed,risk-action-timeout:Risk control action timeout\]
created-at
long
true
The timestamp in milliseconds for the transfer creation
updated-at
long
true
The timestamp in milliseconds for the transfer's latest update
sub-type
string
true
Deprecated parameter
request-id
string
true
Deprecated parameter
chain-full-name
string
true
Deprecated parameter
from-addr-tag
string
true
Deprecated parameter
address-id
string
true
Deprecated parameter
wallet-confirm
string
true
Deprecated parameter
true
Note:
* Should input 'CLOUD-EXCHANGE: 6X2K9L4V1C' in the request header
* API signature does not include the "/sapi/v1" part for url paths, only the "/sunx/dw/xxx" is considered.
###
[](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records#request-example)
Request example
###
[](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records#success-example)
Success Example
[PreviousConfirm a Withdraw Request](https://sunx.gitbook.io/sunx/developer/rest/wallet/confirm-a-withdraw-request)
[NextWebsocket Subscription](https://sunx.gitbook.io/sunx/developer/websocket-subscription)
Last updated 15 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records#response-parameter)
* [Request example](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records#request-example)
* [Success Example](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records#success-example)
Copy
GET /sapi/v1/sunperp/dw/query/deposit-withdraw?SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-12-23T07%3A08%3A24&type=deposit
Copy
{
"status": "ok",
"data": [\
{\
"id": 161234626,\
"type": "deposit",\
"sub-type": "SUN_PERP_USER_DEPOSIT",\
"request-id": "trc20usdt-500e802ba8ece8f0022c876109132d601fb7211e0ca406da87f08440b6f19d07-201",\
"currency": "usdt",\
"chain": "trc20usdt",\
"chain-full-name": "TRON",\
"tx-hash": "500e802ba8ece8f0022c876109132d601fb7211e0ca406da87f08440b6f19d07",\
"amount": 18.8,\
"from-addr-tag": "",\
"address-id": 0,\
"address": "TEubMt2TNag5NN1JXVaeysUk8GNTTYmtVX",\
"address-tag": "",\
"fee": 0,\
"state": "safe",\
"wallet-confirm": 20,\
"created-at": 1757935674710,\
"updated-at": 1757935745174\
}\
]
}
---
# Ws Place batch orders | SunX
####
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#place_batch_orders)
place\_batch\_orders
Signature verification: Yes
Interface permission: Trade
Rate Limit: Shared REST frequency limit
Interface description: This interface only supports websocket contract batch orders.
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#subscription-address)
Subscription Address
Environment
Address
Online
wss://api.sunx.io/ws/v1/trade
Online (preferred by aws customers)
wss://api.sunx.io/ws/v1/trade
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#undefined)
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#subscription-parameter)
Subscription Parameter
Field Name
Type
Description
op
string
Required; Operator Name, place\_batch\_orders
cid
string
Optional; Requests unique ID
data
array
batch order parameters
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
false
contract\_code
String
false
Symbol
margin\_mode
String
false
Margin mode: cross (Cross margin)
position\_side
String
false
Position side
long: going long; short: going short; both: One-way mode. You must input long or short and both is default.
side
String
false
Order side
buy; sell
type
String
false
Order type; enumeration
"market": market order; "limit": limit order; "post\_only": post-only order
price\_match
String
false
BBO and price are mutually exclusive
opponent: counterparty price; "optimal\_5": Best 5 BBO; "optimal\_10": Best 10 BBO; "optimal\_20": Best 20 BBO
client\_order\_id
String
false
Order ID you entered
Clients fill and maintain themselves. the value must be in \[1, 9223372036854775807\]
price
String
false
Price, applicable for limit orders only. No price input is required for market orders.
volume
String
false
Order size, specifically in Cont
reduce\_only
Integer
false
Reduce only: 0 is false; 1 is true
time\_in\_force
String
false
Enumerate FOK, IOC, and GTC. It is an optional field with GTC by default.
tp\_trigger\_price
String
false
Trigger price of your take profit order
tp\_order\_price
String
false
Price of your take profit order. (There is no need to input a price when using BBO.)
tp\_type
String
false
Type of your take profit order. "market" is default with no input. "market": market order; "limit": limit order. "optimal\_5": Best 5 BBO; "optimal\_10": Best 10 BBO; "optimal\_20": Best 20 BBO.
tp\_trigger\_price\_type
String
false
Trigger price type of your take profit order. The last price is default.
"last": last price; "market": mark price
sl\_trigger\_price
String
false
SL Trigger Price
sl\_order\_price
String
false
Price of your stop loss order. (There is no need to input a price when using BBO.)
sl\_type
String
false
Type of your stop loss order. "market" is default with no input. "market": market order; "limit": limit order. "optimal\_5": Best 5 BBO; "optimal\_10": Best 10 BBO; "optimal\_20": Best 20 BBO.
sl\_trigger\_price\_type
String
false
Trigger price type of your stop loss order. The last price is default.
"last": last price; "market": mark price
price\_protect
boolean
false
Price protection. "false" is default. The parameter is needed when you set TP/SL.
false or true
self\_match\_prevent
String
false
Self-trading prevention
Currently only supports cancel\_taker
The default is cancel\_taker
false
Notes: Notes: position\_side is the side of your position. This parameter is optional in the One-way mode. The field is optional, and only "both" can be entered. However, in Hedge mode, this field is mandatory, and only "long" or "short" can be selected. In Hedge mode, "side" and "position\_side" need to be combined. Open long (Enter "buy" in the side field; "long" in the position\_side field) Open short (Enter "sell" in the side field; "short" in the position\_side field) Close long (Enter "sell" in the side field; "long" in the position\_side field) Close short (Enter "buy" in the side field; "short" in the position\_side field) In One-way mode, a long position returns "buy," while a short position returns "sell."
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
code
int
true
Response Code
200: Success, non 200: Error
message
String
true
Response Description
object array
true
code
int
true
Order Response Code
200: Success, non 200: Error
message
String
true
Order Response Description
order\_id
String
true
Order ID
client\_order\_id
String
true
The order ID you entered when placing an order. The ID will not be returned if it is not provided.
false
ts
long
true
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#example-of-a-successful-request)
Example of a Successful Request
[PreviousWebsocket Trading](https://sunx.gitbook.io/sunx/developer/websocket-trading)
[NextWs Cancel batch Orders](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders)
Last updated 19 days ago
* [Subscription Address](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#subscription-address)
* [](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#undefined)
* [Subscription Parameter](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#subscription-parameter)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#request-example)
* [Example of a Successful Request](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders#example-of-a-successful-request)
Copy
{
"op": "place_batch_orders",
"cid": "place_batch_orders_1234",
"data": [\
{\
"time_in_force": "gtc",\
"price_protect": "true",\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"position_side": "long",\
"price": 5000,\
"volume": 1,\
"side": "buy",\
"lever_rate": 5,\
"type": "limit"\
},\
{\
"time_in_force": "gtc",\
"price_protect": "true",\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"position_side": "long",\
"price": 5000,\
"volume": 1,\
"side": "buy",\
"lever_rate": 5,\
"type": "limit"\
}\
]
}
Copy
{
"code": 200,
"message": "Success",
"data": [\
{\
"orderId": "1358936204495511552",\
"clientOrderId": "1358936204495511552",\
"code": 200,\
"message": "Success"\
},\
{\
"orderId": "1358936204537454592",\
"clientOrderId": "1358936204537454592",\
"code": 200,\
"message": "Success"\
}\
],
"ts": 1744037238982,
"cid": "place_batch_orders_1234"
}
---
# Ws Cancel batch Orders | SunX
####
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#cancel_batch_orders)
cancel\_batch\_orders
Signature verification: Yes
Interface permission: Trade
Rate Limit: Shared REST frequency limit
Interface description: This interface supports websocket contract batch order cancellation.
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#subscription-address)
Subscription Address
Environment
Address
Online
wss://api.sunx.io/ws/v1/trade
Online (preferred by aws customers)
wss://api.sunx.io/ws/v1/trade
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#subscription-parameter)
Subscription Parameter
Field Name
Type
Description
op
string
Required; Operator Name,cancel\_batch\_orders
cid
string
Optional; Requests unique ID
data
string
cancellation parameters
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
true
Symbol
order\_id
String
false
Order ID
client\_order\_id
String
false
Your order ID
Clients fill and maintain themselves. the value must be in \[1, 9223372036854775807\]
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
code
int
true
Response Code
200: Success, non 200: Error
message
String
true
Response Description
object
false
code
int
true
Order cancellation result
200: Success, non 200: Error
message
String
true
Order cancellation result description
order\_id
String
true
Order ID
client\_order\_id
String
true
Your order ID
false
ts
long
true
Time of Respond Generation, Unit: Millisecond
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#example-of-a-successful-request)
Example of a Successful Request
[PreviousWs Place batch orders](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-place-batch-orders)
[NextError code](https://sunx.gitbook.io/sunx/developer/error-code)
Last updated 19 days ago
* [Subscription Address](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#subscription-address)
* [Subscription Parameter](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#subscription-parameter)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#request-example)
* [Example of a Successful Request](https://sunx.gitbook.io/sunx/developer/websocket-trading/ws-cancel-batch-orders#example-of-a-successful-request)
Copy
{
"op": "cancel_batch_orders",
"cid": "cancel_batch_orders_1240",
"data": {
"contract_code": "BTC-USDT",
"order_id": [\
"1329854623927160832",\
"1329854624082350080"\
],
"client_order_id": [\
"1329854623927160832",\
"1329854624082350080"\
]
}
}
Copy
{
"code": 200,
"message": "Success",
"data": [\
{\
"orderId": "1358944125296009216",\
"clientOrderId": "1358944125296009216",\
"code": 200,\
"message": "Success"\
},\
{\
"orderId": "1358944503467040768",\
"clientOrderId": "1358944503467040768",\
"code": 200,\
"message": "Success"\
}\
],
"ts": 1744041034439,
"cid": "cancel_batch_orders_1240"
}
---
# Subscribe Index Kline Data | SunX
####
[](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#market.usdcontract_code.index.usdperiod)
market.$contract\_code.index.$period
Signature verification: Yes
Interface permission: Read
Rate Limit: For public interface to get market data such as Get Kline data, Get Market Data Overview, Get Contract Information,Get market in-depth data, Get premium index Kline, Get real-time forecast capital rate kline, Get basis data, Get the last Trade of a Contract and so on: For websocket: The rate limit for “req” request is 50 times at once. No limit for “sub” request as the data will be pushed by sever voluntarily.
Interface description: The interface supports cross margin mode and isolated margin mode.
###
[](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#subscription-address)
Subscription Address
Environment
Address
Online
wss://api.sunx.io/ws/v1/index
Online (preferred by aws customers)
wss://api.sunx.io/ws/v1/index
###
[](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#subscription-parameter)
Subscription Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
string
true
index symbol
Case-Insenstive.Both uppercase and lowercase are supported.."BTC-USDT","ETH-USDT"...
period
string
true
kline type
1min, 5min, 15min, 30min, 60min,4hour,1day, 1mon
Notes: Pushed once the index data is changed. Periodical Push when the index data hasn't changed according to the kline period.
###
[](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#data-update)
Data Update
Parameter
Data Type
Required
Description
Value Range
ch
string
false
Data channel,Format:market.$contract\_code.index.$period
ts
long
false
Time of Respond Generation, Unit: Millisecond
object array
false
id
string
false
index kline id,the same as kline timestamp,kline start timestamp
vol
string
false
Trade Volume. The value is 0.
count
decimal
false
count. The value is 0.
open
string
false
open index price
close
string
false
close index price
low
string
false
lowest index price
high
string
false
highest index price
amount
string
false
amount based on coins.
false
###
[](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#subscription-example)
Subscription Example
###
[](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#example-of-a-successful-subscription)
Example of a Successful Subscription
###
[](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#example-of-a-data-update)
Example of a Data Update
###
[](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#example-of-a-subscription-cancellation)
Example of a Subscription Cancellation
[PreviousRequest Trade Detail Data](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/request-trade-detail-data)
[NextWebsocket Trading](https://sunx.gitbook.io/sunx/developer/websocket-trading)
Last updated 1 month ago
* [Subscription Address](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#subscription-address)
* [Subscription Parameter](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#subscription-parameter)
* [Data Update](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#data-update)
* [Subscription Example](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#subscription-example)
* [Example of a Successful Subscription](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#example-of-a-successful-subscription)
* [Example of a Data Update](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#example-of-a-data-update)
* [Example of a Subscription Cancellation](https://sunx.gitbook.io/sunx/developer/websocket-subscription/public-channel/subscribe-index-kline-data#example-of-a-subscription-cancellation)
Copy
{
"sub": "market.BTC-USDT.index.1min",
"id": "id1"
}
Copy
{
"id": "id1",
"status": "ok",
"subbed": "market.BTC-USDT.index.1min",
"ts": 1489474081631
}
Copy
{
"ch": "market.BTC-USDT.index.15min",
"ts": 1607309592214,
"tick": {
"id": 1607309100,
"open": "19213.505",
"close": "19242.05",
"high": "19248.31",
"low": "19213.505",
"amount": "0",
"vol": "0",
"count": 0
}
}
Copy
{
"unsub": "market.BTC-USDT.index.1min",
"id": "id1"
}
---
# Market Heartbeat | SunX
WebSocket API supports two-way heartbeat. Both Server and Client can send ping message, which the opposite side can return with pong message.
* WebSocket Server sends heartbeat:
`{"ping": 18212558000}`
* WebSocket Client should respond::
`{"pong": 18212558000}`
Note: Once the WebSocket Client and WebSocket Server get connected, the server will send a heartbeat every 5 seconds (the frequency might change). The connection will get disconnected automatically if the WebSocket Client ignores the heartbeat message for 5 times. The server will remain connection if the WebSocket Client responds one “ping” value within the latest 2 heartbeat messages.
[PreviousWebSocket Heartbeat](https://sunx.gitbook.io/sunx/developer/quick-start/websocket-heartbeat)
[NextOrder Push Heartbeat](https://sunx.gitbook.io/sunx/developer/quick-start/websocket-heartbeat/order-push-heartbeat)
Last updated 2 months ago
---
# Get Contract Info | SunX
**/sapi/v1/public/contract\_info**
Request type: GET
Signature verification: No
Interface permission: Read
Rate Limit: For public interface used to get information of index, price limit, settlement, delivery, open positions and so on, the rate limit is 240 times every 3 second at most for each IP (this 240 times every 3 second public interface rate limit is shared by all the requests from that IP of non-marketing information, like above).
Interface description: The interface supports cross margin mode and isolated margin mode. The request parameter "support\_margin\_mode" should be "all" when querying the contract information which supports the cross margin mode and the isolated margin mode both. The value of "cross" or "isolated" just can query the contract information which only supports the cross margin mode or the isolated margin mode. Please keep attention. The request parameter "contract\_code" supports the contract code of futures, in that the format is BTC-USDT-201101; When both of pair, contract\_type and contract\_code filled in, the contract\_code is the preferred. business\_type is a required parameter when query info of futures contract, and its value must be futures or all. When support\_margin\_mode is isolated,contract\_type, business\_type should not be futures type. And when support\_margin\_mode is cross, the return data is future's data Notes:contract elements it can display more futures fields, we recommend you to use it.
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
string
false
swap: "BTC-USDT"... , future: "BTC-USDT-210625" ...
support\_margin\_mode
string
false
support margin mode cross:"cross";isolated:"isolated";all:"all"
pair
string
false
BTC-USDT
contract\_type
string
false
swap, this\_week, next\_week, quarter, next\_quarter
business\_type
string
false
futures, swap, all(default is swap)
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
status
string
true
Request Processing Result
"ok" , "error"
false
symbol
string
true
symbol
"BTC","ETH"...
contract\_code
string
true
Contract Code
swap: "BTC-USDT"... , future: "BTC-USDT-210625" ...
contract\_size
decimal
true
Contract Value (USDT of one contract)
10, 100...
price\_tick
decimal
true
Minimum Variation of Contract Price
0.001, 0.01...
settlement\_date
string
true
Settlement Date
eg "1490759594752"
create\_date
string
true
Listing Date
eg "20190808"
delivery\_time
string
true
delivery time(When the contract does not need to be delivered, the field value is an empty string),millesecond timestamp
contract\_status
int
true
Contract Status
contract status : 0: Delisting,1: Listing,2: Pending Listing,3: Suspension,4: Suspending of Listing,6: Delivering,8: Delivered
support\_margin\_mode
string
false
support margin mode
cross:"cross";isolated:"isolated";all:"all"
contract\_type
string
true
contract type
swap, this\_week, next\_week, quarter, next\_quarter
pair
string
true
pair
such as: “BTC-USDT”
business\_type
string
true
business type
futures, swap
delivery\_date
string
true
delivery date, empty string when swap
such as: "20180720"
trade\_partition
string
true
Deprecated
false
ts
long
true
Time of Respond Generation,Unit:Millisecond
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info#response-example)
Response Example
[PreviousBasic Information](https://sunx.gitbook.io/sunx/developer/rest/basic-information)
[NextGet Swap Index Price Information](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info#response-example)
Copy
GET https://api.sunx.io/sapi/v1/public/contract_info?contract_code=BTC-USDT
Copy
{
"status": "ok",
"data": [{\
"symbol": "BTC",\
"contract_code": "BTC-USDT",\
"contract_size": 0.001000000000000000,\
"price_tick": 0.100000000000000000,\
"delivery_date": "",\
"delivery_time": "",\
"create_date": "20250910",\
"contract_status": 1,\
"adjust": [],\
"price_estimated": [],\
"settlement_date": "1758009600000",\
"support_margin_mode": "all",\
"open_type": 0,\
"business_type": "swap",\
"pair": "BTC-USDT",\
"contract_type": "swap",\
"trade_partition": "USDT"\
}],
"ts": 1758005786211
}
---
# Get Swap Index Price Information | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information#sapi-v1-public-index)
/sapi/v1/public/index
Request type: GET
Signature verification: No
Interface permission: Read
Rate Limit: For public interface used to get information of index, price limit, settlement, delivery, open positions and so on, the rate limit is 240 times every 3 second at most for each IP (this 240 times every 3 second public interface rate limit is shared by all the requests from that IP of non-marketing information, like above).
Interface description: The interface supports cross margin mode and isolated margin mode.
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
string
false
Case-insenstive."BTC-USDT","ETH-USDT"...
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
status
string
true
Request Processing Result
"ok" , "error"
false
contract\_code
string
true
contract code
"BTC-USDT","ETH-USDT"...
index\_price
decimal
true
Index Price
index\_ts
Long
true
Index time
trade\_partition
stringtrue
true
Deprecated parameter
false
ts
long
true
Time of Respond Generation,Unit:Millisecond
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information#response-example)
Response Example
[PreviousGet Contract Info](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-contract-info)
[NextGet Futures Risk Limit](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information#response-example)
Copy
GET https://api.sunx.io/sapi/v1/public/index?contract_code=BTC-USDT
Copy
{
"status": "ok",
"data": [{\
"index_price": 115881.748571428571428571,\
"index_ts": 1758006143000,\
"contract_code": "BTC-USDT",\
"trade_partition": "USDT"\
}],
"ts": 1758006143573
}
Copy
---
# Get Futures Risk Limit | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#undefined)
####
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#sapi-v1-public-risk-limit)
/sapi/v1/public/risk/limit
Request type: GET
Signature verification: Yes
Interface permission: Read
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each UID (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Get information from the Futures Risk Limit Table.
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#request-address)
Request Address
Environment
Address
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
Online
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
false
Symbol
"BTC-USDT", "ETH-USDT"……
contract\_type
String
false
Contract type
swap: Perpetual; this\_week: Weekly; next\_week: Bi-weekly; quarter: Quarterly; next\_quarter: Bi-quarterly
margin\_mode
String
false
Margin mode
cross: Cross margin
tier
String
false
View designated position tier
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
contract\_code
String
true
Symbol
"BTC-USDT", "ETH-USDT"……
contract\_type
String
true
Contract type
swap: Perpetual; this\_week: Weekly; next\_week: Bi-weekly; quarter: Quarterly; next\_quarter: Bi-quarterly
margin\_mode
String
true
Margin mode
cross: Cross margin
tier
String
true
View designated position tier
max\_lever
String
true
Current maximum leverage
maintenance\_margin\_rate
String
true
Current maintenance margin ratio
max\_volume
String
true
Current maximum position Cont
min\_volume
String
true
Current minimum position Cont
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#response-example)
Response Example
[PreviousGet Swap Index Price Information](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-index-price-information)
[NextGet funding rate](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit#response-example)
Copy
GET https://api.sunx.io/sapi/v1/public/risk/limit?contract_code=BTC-USDT
Copy
{
"code": 200,
"message": "Success",
"data": [\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"tier": 1,\
"max_lever": "200",\
"maintenance_margin_rate": "0.00385",\
"max_volume": "400",\
"min_volume": "1"\
},\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"tier": 2,\
"max_lever": "100",\
"maintenance_margin_rate": "0.005",\
"max_volume": "4000",\
"min_volume": "401"\
},\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"tier": 3,\
"max_lever": "50",\
"maintenance_margin_rate": "0.015",\
"max_volume": "8000",\
"min_volume": "4001"\
},\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"tier": 4,\
"max_lever": "30",\
"maintenance_margin_rate": "0.02",\
"max_volume": "120000",\
"min_volume": "8001"\
},\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"tier": 5,\
"max_lever": "20",\
"maintenance_margin_rate": "0.03",\
"max_volume": "500000",\
"min_volume": "120000"\
}\
],
"ts": 1740126940401
}
---
# Get funding rate | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate#sapi-v1-public-funding_rate)
/sapi/v1/public/funding\_rate
Request type: GET
Signature verification: No
Interface permission: Read
Rate Limit: For public interface used to get information of index, price limit, settlement, delivery, open positions and so on, the rate limit is 240 times every 3 second at most for each IP (this 240 times every 3 second public interface rate limit is shared by all the requests from that IP of non-marketing information, like above).
Interface description: The interface supports cross margin mode and isolated margin mode.
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
string
true
contract code
Case-Insenstive."BTC-USDT" ...
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
status
string
false
response status
"ok" , "error"
ts
long
false
response timestamp.unit:millionSeconds.
false
symbol
string
false
symbol
"BTC","ETH"...
contract\_code
string
false
contract code,eg:"BTC-USDT"
fee\_asset
string
false
fee asset
eg:"BTC","ETH"...
funding\_time
string
false
current funding time
funding\_rate
string
false
current funding rate(Updated once a minute)
estimated\_rate
string
false
(Deprecated, default is null)
next\_funding\_time
string
false
(Deprecated, default is null)
trade\_partitio
string
true
Deprecated parameter
false
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate#response-example)
Response Example
[PreviousGet Futures Risk Limit](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-futures-risk-limit)
[NextGet historical funding rate](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate#response-example)
Copy
GET https://api.sunx.io/sapi/v1/public/funding_rate?contract_code=BTC-USDT
Copy
{
"status": "ok",
"data": {
"estimated_rate": null,
"funding_rate": "0.000100000000000000",
"contract_code": "BTC-USDT",
"symbol": "BTC",
"fee_asset": "USDT",
"funding_time": "1758009600000",
"next_funding_time": null,
"trade_partition": "USDT"
},
"ts": 1758006390362
}
---
# Get Swap Price Limitation | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation#sapi-v1-public-price_limit)
/sapi/v1/public/price\_limit
Request type: GET
Signature verification: No
Interface permission: Read
Rate Limit: For public interface used to get information of index, price limit, settlement, delivery, open positions and so on, the rate limit is 240 times every 3 second at most for each IP (this 240 times every 3 second public interface rate limit is shared by all the requests from that IP of non-marketing information, like above).
Interface description: The interface supports cross margin mode and isolated margin mode. The request parameter "contract\_code" supports the contract code of futures, in that the format is BTC-USDT-201101; When both of pair, contract\_type and contract\_code filled in, the contract\_code is the preferred. business\_type is a required parameter when query info of futures contract, and its value must be futures or all.
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
string
false
swap: "BTC-USDT"... , future: "BTC-USDT-210625" ...
pair
string
false
pair, BTC-USDT
contract\_type
string
false
contract type: swap, this\_week, next\_week, quarter, next\_quarter
business\_type
string
false
business type, default is swap: futures, swap, all
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
status
string
true
Request Processing Result
"ok" ,"error"
false
symbol
string
true
Variety code
"BTC","ETH" ...
high\_limit
decimal
true
Highest Buying Price
low\_limit
decimal
true
Lowest Selling Price
contract\_code
string
true
Contract Code
eg swap: "BTC-USDT"... , future: "BTC-USDT-210625" ...
contract\_type
string
true
contract type
swap, this\_week, next\_week, quarter, next\_quarter
pair
string
true
pair
such as: “BTC-USDT”
business\_type
string
true
business type
futures, swap
trade\_partition
string
true
Deprecated parameter
false
ts
long
true
Time of Respond Generation, Unit: Millisecond
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation#response-example)
Response Example
[PreviousGet historical funding rate](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate)
[NextAssets Available for Multi-Assets Collateral mode](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation#response-example)
Copy
GET https://api.sunx.io/sapi/v1/public/price_limit?contract_code=BTC-USDT
Copy
{
"status": "ok",
"data": [{\
"symbol": "BTC",\
"contract_code": "BTC-USDT",\
"high_limit": 121563.500000000000000000000000000000000000,\
"low_limit": 109986.100000000000000000000000000000000000,\
"business_type": "swap",\
"pair": "BTC-USDT",\
"contract_type": "swap",\
"trade_partition": "USDT"\
}],
"ts": 1758006886072
}
---
# Get historical funding rate | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate#sapi-v1-public-funding_rate_history)
/sapi/v1/public/funding\_rate\_history
Request type: GET
Signature verification: No
Interface permission: Read
Rate Limit: For public interface used to get information of index, price limit, settlement, delivery, open positions and so on, the rate limit is 240 times every 3 second at most for each IP (this 240 times every 3 second public interface rate limit is shared by all the requests from that IP of non-marketing information, like above).
Interface description: The interface supports cross margin mode and isolated margin mode.
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
string
true
contract code
Case-Insenstive.eg:"BTC-USDT" ...
page\_index
int
false
page index. 1 by default
page\_size
int
false
page size.20 by default. 50 at most
\[1-50\]
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
status
string
false
response status
"ok" , "error"
ts
long
false
response timestamp.unit:millionSeconds.
false
symbol
string
false
symbol
eg:"BTC","ETH"...
contract\_code
string
false
contract code
eg: "BTC-USDT
fee\_asset
string
false
fee asset
eg:"USDT"
funding\_time
string
false
funding time
funding\_rate
string
false
funding rate
realized\_rate
string
false
(Deprecated, default is null)
avg\_premium\_index
string
false
average premium index
false
total\_page
int
false
total page
current\_page
int
false
current page
total\_size
int
false
total size
trade\_partition
string
true
Deprecated parameter
false
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate#response-example)
Response Example
[PreviousGet funding rate](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-funding-rate)
[NextGet Swap Price Limitation](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-historical-funding-rate#response-example)
Copy
GET https://api.sunx.io/sapi/v1/public/funding_rate_history?contract_code=BTC-USDT
Copy
{
"status": "ok",
"data": {
"total_page": 1,
"current_page": 1,
"total_size": 3,
"data": [{\
"avg_premium_index": "-0.000129806166799078",\
"trade_partition": "USDT",\
"funding_rate": "0.000100000000000000",\
"realized_rate": null,\
"funding_time": "1757980800000",\
"contract_code": "BTC-USDT",\
"symbol": "BTC",\
"fee_asset": "USDT"\
}, {\
"avg_premium_index": "-0.000033768740337556",\
"trade_partition": "USDT",\
"funding_rate": "0.000100000000000000",\
"realized_rate": null,\
"funding_time": "1757952000000",\
"contract_code": "BTC-USDT",\
"symbol": "BTC",\
"fee_asset": "USDT"\
}]
},
"ts": 1758006694468
}
---
# Get information on swap trading fee | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee#sapi-v1-account-fee_rate)
/sapi/v1/account/fee\_rate
Request type: POST
Signature verification: Yes
Interface permission: Read
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each UID (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: The interface supports cross margin mode and isolated margin mode. The request parameter "contract\_code" supports the contract code of futures, in that the format is BTC-USDT-210625. When both of pair, contract\_type and contract\_code filled in, the contract\_code is the preferred. business\_type is a required parameter when query info of futures contract, and its value must be futures or all.
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
string
false
contract type code
swap: "BTC-USDT"... , future: "BTC-USDT-210625" ...
pair
string
false
pair
BTC-USDT
contract\_type
string
false
contract type
swap, this\_week, next\_week, quarter, next\_quarter
business\_type
string
false
business type, default is swap
futures, swap, all
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
status
string
true
Request Processing Result
"ok" , "error"
ts
long
true
Time of Respond Generation, Unit: Millisecond
false
symbol
string
true
Variety code
contract\_code
string
true
contract type code
swap: "BTC-USDT"... , future: "BTC-USDT-210625" ...
open\_maker\_fee
string
true
Open maker order fee, decimal
open\_taker\_fee
string
true
Open taker order fee, decimal
close\_maker\_fee
string
true
Close maker order fee, decimal
close\_taker\_fee
string
true
Close taker order fee, decimal
fee\_asset
string
true
the corresponding cryptocurrency to the given fee
"USDT"...
contract\_type
string
true
contract type
swap, this\_week, next\_week, quarter, next\_quarter
pair
string
true
pair
such as: “BTC-USDT”
business\_type
string
true
business type
futures, swap
delivery\_fee
string
true
delivery fee rate
trade\_partition
string
true
Deprecated parameter
false
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee#response-example)
Response Example
[PreviousGet trading bills](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills)
[NextOrder](https://sunx.gitbook.io/sunx/developer/rest/order)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee#response-example)
Copy
POST https://api.sunx.io/sapi/v1/account/fee_rate?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
Copy
{
"status": "ok",
"data": [\
{\
"symbol": "BTC",\
"contract_code": "BTC-USDT",\
"open_maker_fee": "0.00015",\
"open_taker_fee": "0.0004",\
"close_maker_fee": "0.00015",\
"close_taker_fee": "0.0004",\
"fee_asset": "USDT",\
"delivery_fee": "0",\
"business_type": "swap",\
"contract_type": "swap",\
"pair": "BTC-USDT",\
"trade_partition": "USDT"\
}\
],
"ts": 1758009960093
}
---
# Get Account Balance | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-account-balance#sapi-v1-account-balance)
/sapi/v1/account/balance
Request type: GET
Signature verification: Yes
Interface permission: Read
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each UID (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: For Multi-Assets Collateral Mode users: Get information about your Futures account.
####
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-account-balance#request-address)
Request Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-account-balance#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
state
String
true
Account status 1(NORMAL): The account is functioning normally for trading and transfers. 3 (LIQUIDATING): The account is under liquidation, and trading, transfers, and the receipt of funding fees are unavailable. 5(ADL): The account is under auto deleveraging, and trading, transfers, and the receipt of funding fees are unavailable. 6(OPEN\_LIMIT): Orders are being canceled for risk management. Only ADL orders are allowed for futures trading; transfers in are permitted, but transfers out are not allowed.
equity
String
true
Account Equity
initial\_margin
String
true
Initial margin
maintenance\_margin
String
true
Maintenance margin
maintenance\_margin\_rate
String
true
Maintenance margin ratio
profit\_unreal
String
true
Unrealized PnL
available\_margin
String
true
Available collateral
voucher\_value
String
true
voucher value(usdt)
created\_time
String
true
Account creation time
updated\_time
String
true
Account update time
details
list
true
currency
String
true
Cryptocurrency
equity
String
true
Equity of a cryptocurrency
available
String
true
Available balance of a cryptocurrency
withdraw\_available
String
true
withdraw\_available
profit\_unreal
String
true
Unrealized PnL
initial\_margin
String
true
Initial margin of a cryptocurrency
maintenance\_margin
String
true
Maintenance margin of a cryptocurrency
maintenance\_margin\_rate
String
true
Maintenance margin ratio of a cryptocurrency
initial\_margin\_rate
String
true
Initial margin ratio of a cryptocurrency
voucher
String
true
voucher
voucher\_value
String
true
voucher value(usdt)
created\_time
String
true
Creation time
updated\_time
String
true
Update time
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-account-balance#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-account-balance#response-example)
Response Example
[PreviousAccount](https://sunx.gitbook.io/sunx/developer/rest/account)
[NextGet trading bills](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills)
Last updated 1 month ago
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/account/get-account-balance#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/account/get-account-balance#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/account/get-account-balance#response-example)
Copy
GET https://api.sunx.io/sapi/v1/account/balance?SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
Copy
{
"code": 200,
"message": "Success",
"data": {
"state": "normal",
"equity": "0.004015101942876636",
"details": [\
{\
"currency": "USDT",\
"equity": "0.004015101942876636",\
"available": "0.004015101942876636",\
"profit_unreal": "0",\
"initial_margin": "0",\
"maintenance_margin": "0",\
"maintenance_margin_rate": "0",\
"initial_margin_rate": "0",\
"voucher": "0",\
"voucher_value": "0",\
"withdraw_available": "0.004015101942876636",\
"created_time": 1757935751532,\
"updated_time": 1758895045039\
}\
],
"initial_margin": "0",
"maintenance_margin": "0",
"maintenance_margin_rate": "0",
"profit_unreal": "0",
"available_margin": "0.004015101942876636",
"voucher_value": "0",
"created_time": 1757472792969,
"updated_time": 1758895045039
},
"ts": 1759042264737
}
---
# Assets Available for Multi-Assets Collateral mode | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode#sapi-v1-public-multi_assets_margin)
/sapi/v1/public/multi\_assets\_margin
Request type: GET
Signature verification: Yes
Interface permission: Read
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each UID (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Get assets available for the Multi-Assets Collateral mode
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode#request-address)
Request Address
Environment
Address
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
Online
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
multi\_assets
list
true
Assets available for the Multi-Assets Collateral mode
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode#request-example)
Request Example
Copy
GET https://api.sunx.io/sapi/v1/public/multi_assets_margin
###
[](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode#response-example)
Response Example
Copy
{
"code": 200,
"message": "Success",
"data": {
"multi_assets": [\
"USDT"\
]
},
"ts": 1757908198548
}
[PreviousGet Swap Price Limitation](https://sunx.gitbook.io/sunx/developer/rest/basic-information/get-swap-price-limitation)
[NextAccount](https://sunx.gitbook.io/sunx/developer/rest/account)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode#request-address)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/basic-information/assets-available-for-multi-assets-collateral-mode#response-example)
---
# Get trading bills | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills#sapi-v1-account-bill_record)
/sapi/v1/account/bill\_record
Request type: POST
Signature verification: Yes
Interface permission: Read
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each UID (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: The interface supports cross margin mode and isolated margin mode. The request parameter "contract" supports the contract code of futures, in that the format is BTC-USDT-210625.
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract
string
false
contract code
Case-Insenstive.Both uppercase and lowercase are supported.e.g. "BTC-USDT"
mar\_acct
string
true
margin account
USDT
start\_time
long
false
Query start time, query by data creation time
Value range \[((end-time) – 48h), (end-time)\], maximum query window size is 48 hours, query window shift should be within past 90 days.
end\_time
long
false
Query end time, query data by creation time
Value range \[(present-90d), present\], maximum query window size is 48 hours, query window shift should be within past 90 days.
now
direct
string
false
Search direct, If the direction is NEXT, the data is returned in positive chronological order; if the direction is PREV, the data is returned in reverse chronological order
next, prev default is prev
next
from\_id
long
false
If the query direction is prev, from\_id should be the min query\_id in the last query result. If the query direction is next, from\_id should be the max query\_id in the last query result
Search query\_id to begin with
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
code
int
true
State code
msg
string
true
The code description
ts
long
true
Timestamp
object array
true
query\_id
long
true
id
long
true
ts
long
true
create time
asset
string
true
asset
"USDT"...
contract\_code
string
true
contract code
swap: "BTC-USDT"... , future: "BTC-USDT-210625" ...
margin\_account
string
true
margin account
"BTC-USDT","USDT"...
face\_margin\_account
string
true
the counterparty margin account, only has value when the transaction Type is 34, 35, 36, 37, 38, 39, and the other types are empty strings
"BTC-USDT"...
type
int
true
transaction Type
3:close long; 4:close short; 5:fees for open positions-taker; 6:fees for open positions-maker; 7:fees for close positions-taker; 8:fees for close positions-maker; 9:close long for delivery; 10:close short for delivery; 11:delivery fee; 12:close long for liquidation; 13:lose short for liquidation; 14:transfer from spot exchange to contract exchange; 15:tranfer from contract exchange to spot exchange; 19:clawback; 26:system; 28:activity prize rewards; 29:rebate; 30:Funding fee-income; 31:Funding fee-expenditure; 34:transfer to sub; 35:transfer from sub; 36:transfer to master; 37:transfer from master; 38:transfer from other margin account; 39:transfer to another margin account;46:ADL close long; 47:ADL close short;66 (system advance account - user currency delivery account (transfer out advance account)); 67 (user currency delivery account - system advance payment account (transfer in advance account))
amount
decimal
true
amount(quote currency)
trade\_partition
string
true
Deprecated
false
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills#response-example)
Response Example
[PreviousGet Account Balance](https://sunx.gitbook.io/sunx/developer/rest/account/get-account-balance)
[NextGet information on swap trading fee](https://sunx.gitbook.io/sunx/developer/rest/account/get-information-on-swap-trading-fee)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/account/get-trading-bills#response-example)
Copy
POST https://api.sunx.io/sapi/v1/account/bill_record?SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"mar_acct":"USDT"
}
Copy
{
"code": 200,
"msg": "ok",
"data": [{\
"id": 235,\
"amount": 18.800000000000000000,\
"asset": "USDT",\
"query_id": 235,\
"type": 14,\
"ts": 1757935751532,\
"contract_code": "",\
"margin_account": "USDT",\
"face_margin_account": "",\
"trade_partition": "USDT"\
}\
],
"ts": 1758107162495
}
---
# Get Current Position | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position#sapi-v1-trade-position-opens)
/sapi/v1/trade/position/opens
Request type: GET
Signature verification: Yes
Interface permission: Read
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Get information about your current position.
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position#request-address)
Request Address
Environment
Address
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
Online
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
false
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
contract\_code
String
true
Symbol
position\_side
String
true
Position side
The side of your position. Under the buy/sell mode, "both" is default. Under the long/short mode, "long" refers to going long; "short" refers to going short.
direction
String
true
Order side
buy; sell
margin\_mode
String
true
Margin mode
cross: Cross margin
open\_avg\_price
String
true
Avg. entry price mode
volume
String
true
Position size (Cont)
available
String
true
Amount of position available to be closed (Cont)
lever\_rate
String
true
Leverage
adl\_risk\_percent
String
true
ADL indicator
Level 1, 2, 3, 4, 5, with level 1 representing the lowest risk and level 5 representing the highest risk.
liquidation\_price
String
true
Est. liquidation price
initial\_margin
String
true
Initial margin, only applicable to cross margin mode
maintenance\_margin
String
true
Maintenance margin margin, only applicable to cross margin mode
profit\_unreal
String
true
Unrealized PnL
profit\_rate
String
true
Unrealized PnL percentage PnL
margin\_rate
String
true
Margin ratio
margin\_currency
String
true
Margin currency (for pricing)
last\_price
decima
true
Last price
contract\_type
String
true
Contract type
swap: Perpetual; this\_week: Weekly; next\_week: Bi-weekly; quarter: Quarterly; next\_quarter: Bi-quarterly
created\_time
String
true
Creation time
updated\_time
String
true
Update time
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position#response-example)
Response Example
[PreviousPosition](https://sunx.gitbook.io/sunx/developer/rest/position)
[NextGet Leverage List](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position#response-example)
Copy
GET https://api.sunx.io/sapi/v1/trade/position/opens?contract_code=BTC-USDT&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
Copy
{
"code": 200,
"message": "Success",
"data": [\
{\
"contract_code": "BTC-USDT",\
"position_side": "both",\
"direction": "buy",\
"margin_mode": "cross",\
"open_avg_price": "1672.36",\
"volume": "10",\
"available": "10",\
"lever_rate": 5,\
"adl_risk_percent": null,\
"liquidation_price": "-6615323.17169213120630934",\
"initial_margin": "23.9516",\
"maintenance_margin": "0.4490925",\
"profit_unreal": "-47.478",\
"profit_rate": "-1.9822",\
"margin_rate": "0.000000681298594547",\
"mark_price": "1197.58",\
"margin_currency": "USDT",\
"contract_type": "swap",\
"created_time": 1740451087505,\
"updated_time": 1740451087505\
}\
],
"ts": 1740451897695
}
---
# Cancel Order | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order#sapi-v1-trade-cancel_order)
/sapi/v1/trade/cancel\_order
Request type: POST
Signature verification: Yes
Interface permission: Trade
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: The interface is used to cancel an order in futures trading.
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
true
Symbol
order\_id
String
false
Order ID
client\_order\_id
String
false
Your order ID
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
order\_id
String
true
Order ID
client\_order\_id
String
true
Your order ID
Either order\_id or client\_order\_id is required.
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order#response-example)
Response Example
[PreviousPlace Multiple Orders](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders)
[NextCancel Multiple Orders](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order#response-example)
Copy
POST https://api.sunx.io/sapi/v1/trade/cancel_order?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"contract_code": "BTC-USDT",
"order_id": 1417232260146774016
}
Copy
{
"code": 200,
"data": {
"client_order_id": "1329854625038651392",
"order_id": "1329854625038651392"
},
"message": "Success",
"ts": 1737104050245
}
---
# Place Order | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-order#sapi-v1-trade-order)
/sapi/v1/trade/order
Request type: POST
Signature verification: Yes
Interface permission: Trade
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Place an order in futures trading.
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-order#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-order#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
true
Symbol
margin\_mode
String
true
Margin mode: cross (Cross margin
position\_side
String
false
Position side
long: going long; short: going short; both: One-way mode. You must input long or short and both is default.
side
String
true
Order side
buy; sell
type
String
true
Order type; enumeration
"market": market order; "limit": limit order; "post\_only": post-only order
price\_match
String
false
BBO and price are mutually exclusive
opponent: counterparty price; "optimal\_5": Best 5 BBO; "optimal\_10": Best 10 BBO; "optimal\_20": Best 20 BBO
client\_order\_id
String
false
Order ID you entered
Clients fill and maintain themselves. the value must be in \[1, 9223372036854775807\]
price
String
false
Price, applicable for limit orders only. No price input is required for market orders.
volume
String
true
Order size, specifically in Cont
reduce\_only
Integer
false
Reduce only: 0 is false; 1 is true
time\_in\_force
String
false
Enumerate FOK, IOC, and GTC. It is an optional field with GTC by default.
tp\_trigger\_price
String
false
Trigger price of your take profit order
tp\_order\_price
String
false
Price of your take profit order. (There is no need to input a price when using BBO.)
tp\_type
String
false
Type of your take profit order. "market" is default with no input. "market": market order; "limit": limit order. "optimal\_5": Best 5 BBO; "optimal\_10": Best 10 BBO; "optimal\_20": Best 20 BBO.
tp\_trigger\_price\_type
String
false
Trigger price type of your take profit order. The last price is default.
"last": last price; "market": mark price
sl\_trigger\_price
String
false
SL Trigger Price
sl\_order\_price
String
false
Price of your stop loss order. (There is no need to input a price when using BBO.)
sl\_type
String
false
Type of your stop loss order. "market" is default with no input. "market": market order; "limit": limit order. "optimal\_5": Best 5 BBO; "optimal\_10": Best 10 BBO; "optimal\_20": Best 20 BBO.
sl\_trigger\_price\_type
String
false
Trigger price type of your stop loss order. The last price is default.
"last": last price; "market": mark price
price\_protect
boolean
false
Price protection. "false" is default. The parameter is needed when you set TP/SL.
false or true
self\_match\_prevent
String
false
Self-trading prevention
cancel\_taker: Cancel a taker order cancel\_maker: Cancel a maker order cancel\_both: Cancel all orders
The default is cancel\_taker
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-order#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
order\_id
String
true
Order ID
client\_order\_id
String
false
The order ID you entered when placing an order. The ID will not be returned if it is not provided.
Notes: Remark: position\_side is the side of your position. This parameter is optional in the One-way mode. The field is optional, and only "both" can be entered. However, in Hedge mode, this field is mandatory, and only "long" or "short" can be selected. In Hedge mode, "side" and "position\_side" need to be combined. Open long (Enter "buy" in the side field; "long" in the position\_side field) Open short (Enter "sell" in the side field; "short" in the position\_side field) Close long (Enter "sell" in the side field; "long" in the position\_side field) Close short (Enter "buy" in the side field; "short" in the position\_side field) In One-way mode, a long position returns "buy," while a short position returns "sell."
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-order#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-order#response-example)
Response Example
[PreviousOrder](https://sunx.gitbook.io/sunx/developer/rest/order)
[NextPlace Multiple Orders](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/order/place-order#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/place-order#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/place-order#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/order/place-order#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/order/place-order#response-example)
Copy
POST https://api.sunx.io/sapi/v1/trade/order?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"time_in_force": "gtc",
"price_protect": "true",
"contract_code": "BTC-USDT",
"margin_mode": "cross",
"position_side": "both",
"price": 0.015,
"volume": 2,
"side": "buy",
"type": "limit"
}
Copy
{
"code": 200,
"data": {
"client_order_id": "1329503956647878656",
"order_id": "1329503956647878656"
},
"message": "Success",
"ts": 1737020044270
}
---
# Place Multiple Orders | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders#sapi-v1-trade-batch_orders)
/sapi/v1/trade/batch\_orders
Request type: POST
Signature verification: Yes
Interface permission: Trade
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Place bulk orders in futures trading
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders#request-address)
Request Address
Environment
Address
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
Online
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
true
Symbol
margin\_mode
String
true
Margin mode; cross: Cross margin
position\_side
String
false
Position side
long: going long; short: going short; both: One-way mode. You must input long or short and both is default.
side
String
true
Order side
buy; sell
type
String
true
Order type; enumeration
"market": market order; "limit": limit order; "post\_only": post-only order
price\_match
String
false
BBO and price are mutually exclusive
opponent: counterparty price; "optimal\_5": Best 5 BBO; "optimal\_10": Best 10 BBO; "optimal\_20": Best 20 BBO
client\_order\_id
String
false
Order ID you entered
Clients fill and maintain themselves. the value must be in \[1, 9223372036854775807\]
price
String
false
Price, applicable for limit orders only. No price input is required for market orders.
volume
String
true
Order size, specifically in Cont
reduce\_only
Boolean
false
Reduce only: 0 is false; 1 is true
time\_in\_force
String
false
Enumerate FOK, IOC, and GTC. It is an optional field with GTC by default.
tp\_trigger\_price
String
false
Trigger price of your take profit order
tp\_order\_price
String
false
Price of your take profit order. (There is no need to input a price when using BBO.)
tp\_type
String
false
Type of your take profit order. "market" is default with no input. "market": market order; "limit": limit order. "optimal\_5": Best 5 BBO; "optimal\_10": Best 10 BBO; "optimal\_20": Best 20 BBO.
tp\_trigger\_price\_type
String
false
Trigger price type of your take profit order. The last price is default.
"last": last price; "market": mark price
sl\_trigger\_price
String
false
SL Trigger Price
sl\_order\_price
String
false
Price of your stop loss order. (There is no need to input a price when using BBO.)
sl\_type
String
false
Type of your stop loss order. "market" is default with no input. "market": market order; "limit": limit order. "optimal\_5": Best 5 BBO; "optimal\_10": Best 10 BBO; "optimal\_20": Best 20 BBO.
sl\_trigger\_price\_type
String
false
Trigger price type of your stop loss order. The last price is default.
"last": last price; "market": mark price
price\_protect
boolean
false
Price protection. "false" is default. The parameter is needed when you set TP/SL
false or true
self\_match\_prevent
String
false
Self-trading prevention
cancel\_taker: Cancel a taker order cancel\_maker: Cancel a maker order cancel\_both: Cancel all orders
The default is cancel\_taker
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
order\_id
String
true
Order ID
client\_order\_id
String
true
The order ID you entered when placing an order. The ID will not be returned if it is not provided.
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders#response-example)
Response Example
[PreviousPlace Order](https://sunx.gitbook.io/sunx/developer/rest/order/place-order)
[NextCancel Order](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/order/place-multiple-orders#response-example)
Copy
POST https://api.sunx.io/sapi/v1/trade/batch_orders?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
[{\
"time_in_force": "gtc",\
"price_protect": "true",\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"position_side": "long",\
"price": 5000,\
"volume": 1,\
"side": "buy",\
"type": "limit"\
},\
{\
"time_in_force": "gtc",\
"price_protect": "true",\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"position_side": "long",\
"price": 5000,\
"volume": 1,\
"side": "buy",\
"type": "limit"\
}]
Copy
{
"code": 200,
"message": "Success",
"data": [\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417232562245373953",\
"client_order_id": "1417232562245373953"\
},\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417232562245373952",\
"client_order_id": "1417232562245373952"\
}\
],
"ts": 1757936173760
}
---
# Create a Withdraw Request | SunX
**/sapi/v1/sunx/dw/withdraw/apply**
Request type: POST
Signature verification: Yes
Interface permission: Withdraw
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Initiate a withdrawal request
####
[](https://sunx.gitbook.io/sunx/developer/rest/wallet/create-a-withdraw-request#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
**Request Parameter**
Parameter
Data Type
Required
Description
Value Range
address
string
true
Withdrawal address
should be the deposit address
currency
string
true
Currency
e.g. usdt
chain
string
true
Chain
e.g. trc20usdt
amount
string
true
Withdrawal amount
fee
string
true
Withdrawal fee
For trc20usdt, this value should be 0
**Response Parameter**
Parameter
Data Type
Required
Description
Value Range
status
string
true
Response state
"ok" or "error"
error-code
string
false
Error code
error-msg
string
false
Error message
object
true
nonce
string
true
The backend generates a random number. This number is unique to the user and is used to label the withdrawal request.
32-bit string, format in \[0-9a-zA-Z\]
content
string
true
The original text that requires the user's signature, the content is to serialize after adding the nonce parameter to the input parameters.
expired-at
long
true
Nonce expiration timestamp, current time + 120 seconds
false
Note:
* Should input 'CLOUD-EXCHANGE: 6X2K9L4V1C' in the request header
* API signature does not include the "/sapi/v1" part for url paths, only the "/sunx/dw/xxx" is considered.
**Request Example**
**Response Example**
[PreviousWallet](https://sunx.gitbook.io/sunx/developer/rest/wallet)
[NextConfirm a Withdraw Request](https://sunx.gitbook.io/sunx/developer/rest/wallet/confirm-a-withdraw-request)
Last updated 15 days ago
Copy
POST https://api.sunperp.io/sapi/v1/sunx/dw/withdraw/apply?SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"address": "TN1F755kgPevmwJZLUqbSaLfMmnVEz1EbV",
"amount": "8.799999",
"chain": "trc20usdt",
"currency": "usdt",
"fee": "0"
}
Copy
{
"status": "ok",
"data": {
"nonce": "85A6B8F36D591055",
"content": "address:TN1F755kgPevmwJZLUqbSaLfMmnVEz1EbV,currency:usdt,chain:trc20usdt,amount:8.799999,fee:1.2,nonce:85A6B8F36D591055",
"expired-at": 1757320137392
}
}
---
# Set Leverage | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage#sapi-v1-position-lever)
/sapi/v1/position/lever
Request type: POST
Signature verification: Yes
Interface permission: Trade
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Get the list of leverage.
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage#request-address)
Request Address
Environment
Address
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
Online
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
true
Symbol
"BTC-USDT", "ETH-USDT"……
margin\_mode
String
true
Margin mode
cross: Cross margin
lever\_rate
Long
true
Leverage
Target leverage
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
contract\_code
String
true
Symbol
"BTC-USDT", "ETH-USDT"……
margin\_mode
String
true
Margin mode
cross: Cross margin
lever\_rate
Long
true
Leverage
Target leverage
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage#response-example)
Response Example
[PreviousGet Leverage List](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list)
[NextGet Position Mode](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage#response-example)
Copy
POST https://api.sunx.io/sapi/v1/position/lever?margin_mode=cross&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"contract_code": "BTC-USDT",
"margin_mode": "cross",
"lever_rate": 5
}
Copy
{
"code": 200,
"message": "Success",
"data": {
"contract_code": "BTC-USDT",
"margin_mode": "cross",
"lever_rate": 5
},
"ts": 1740452492265
}
---
# Confirm a Withdraw Request | SunX
**/sapi/v1/sunx/dw/withdraw/confirm**
Request type: POST
Signature verification: Yes
Interface permission: Withdraw
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Confirm a withdrawal request
####
[](https://sunx.gitbook.io/sunx/developer/rest/wallet/confirm-a-withdraw-request#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
**Request Parameter**
Parameter
Data Type
Required
Description
Default Value
nonce
string
true
Nonce value return by the /apply API
signature
string
true
Signature
**Response Parameter**
Parameter
Data Type
Required
Description
Default Value
status
string
true
Response state
"ok" or "error"
error-code
string
false
Error code
error-msg
string
false
Error message
object
true
order-id
long
true
Withdrawal order id
status
string
true
Withdrawal status
"Verifying"
"Processing"
"Failed"
false
Note:
* Should input 'CLOUD-EXCHANGE: 6X2K9L4V1C' in the request header
* API signature does not include the "/sapi/v1" part for url paths, only the "/sunx/dw/xxx" is considered.
**Request Example**
**Response Example**
[PreviousCreate a Withdraw Request](https://sunx.gitbook.io/sunx/developer/rest/wallet/create-a-withdraw-request)
[NextGet Deposit & Withdraw records](https://sunx.gitbook.io/sunx/developer/rest/wallet/get-deposit-and-withdraw-records)
Last updated 15 days ago
Copy
POST https://api.sunperp.io/sapi/v1/sunx/dw/withdraw/confirm?SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"signature": "0xec4627c60521fa3dfce2cd3de1c38729f60c9d491075bb2845940666f4c7e09e76ba054b96e6c0d48efa41b22ccdc24dfe7aeb70b10fa0fa695e090309798b971c",
"nonce": "85A6B8F36D591055"
}
Copy
{
"status": "ok",
"data": {
"order-id": 161234584,
"status": "Processing"
}
}
---
# Get Leverage List | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list#sapi-v1-position-lever)
/sapi/v1/position/lever
Request type: GET
Signature verification: Yes
Interface permission: Read
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Get the list of leverage.
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
false
Symbol
"BTC-USDT", "ETH-USDT"……
margin\_mode
String
false
Margin mode
cross: Cross margin
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
contract\_code
String
true
Symbol
"BTC-USDT", "ETH-USDT"……
contract\_type
String
true
Contract type
swap: Perpetual; this\_week: Weekly; next\_week: Bi-weekly; quarter: Quarterly; next\_quarter: Bi-quarterly
margin\_mode
String
true
Margin mode
cross: Cross margin
lever\_rate
Long
true
Leverage
available\_lever
String
true
Leverage available
Leverage available
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list#response-example)
Response Example
[PreviousGet Current Position](https://sunx.gitbook.io/sunx/developer/rest/position/get-current-position)
[NextSet Leverage](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/position/get-leverage-list#response-example)
Copy
GET https://api.sunx.io/sapi/v1/position/lever?contract_code=BTC-USDT&margin_mode=cross&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
Copy
{
"code": 200,
"message": "Success",
"data": [\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"lever_rate": 5,\
"contract_type": "swap",\
"available_lever": [\
3,\
4,\
5,\
6,\
7,\
8,\
9,\
10,\
11,\
12,\
13,\
14,\
15,\
16,\
17,\
18,\
19,\
20,\
21,\
22,\
23,\
24,\
25,\
26,\
27,\
28,\
29,\
30,\
31,\
32,\
33,\
34,\
35,\
36,\
37,\
38,\
39,\
40,\
41,\
42,\
43,\
44,\
45,\
46,\
47,\
48,\
49,\
50,\
51,\
52,\
53,\
54,\
55,\
56,\
57,\
58,\
59,\
60,\
61,\
62,\
63,\
64,\
65,\
66,\
67,\
68,\
69,\
70,\
71,\
72,\
73,\
74,\
75,\
76,\
77,\
78,\
79,\
80,\
81,\
82,\
83,\
84,\
85,\
86,\
87,\
88,\
89,\
90,\
91,\
92,\
93,\
94,\
95,\
96,\
97,\
98,\
99,\
100,\
101,\
102,\
103,\
104,\
105,\
106,\
107,\
108,\
109,\
110,\
111,\
112,\
113,\
114,\
115,\
116,\
117,\
118,\
119,\
120,\
121,\
122,\
123,\
124,\
125,\
126,\
127,\
128,\
129,\
130,\
131,\
132,\
133,\
134,\
135,\
136,\
137,\
138,\
139,\
140,\
141,\
142,\
143,\
144,\
145,\
146,\
147,\
148,\
149,\
150,\
151,\
152,\
153,\
154,\
155,\
156,\
157,\
158,\
159,\
160,\
161,\
162,\
163,\
164,\
165,\
166,\
167,\
168,\
169,\
170,\
171,\
172,\
173,\
174,\
175,\
176,\
177,\
178,\
179,\
180,\
181,\
182,\
183,\
184,\
185,\
186,\
187,\
188,\
189,\
190,\
191,\
192,\
193,\
194,\
195,\
196\
]\
}\
],
"ts": 1740452428851
}
---
# Get Position Mode | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode#sapi-v1-position-mode)
/sapi/v1/position/mode
Request type: GET
Signature verification: Yes
Interface permission: Read
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Get the current position mode
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
position\_mode
string
true
Position mode
single\_side: One-way mode; dual\_side: Hedge mode
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode#request-example)
Request Example
Copy
GET https://api.sunx.io/sapi/v1/position/mode?margin_mode=cross&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode#response-example)
Response Example
Copy
{
"code": 200,
"message": "Success",
"data": {
"position_mode": "dual_side"
},
"ts": 1740453311795
}
[PreviousSet Leverage](https://sunx.gitbook.io/sunx/developer/rest/position/set-leverage)
[NextSet Position Mode](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode#request-address)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode#response-example)
---
# Set Position Mode | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode#sapi-v1-position-mode)
/sapi/v1/position/mode
Request type: POST
Signature verification: Yes
Interface permission: Trade
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Switch the current position mode.
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode#request-address)
Request Address
Environment
Address
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
Online
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
position\_mode
string
true
Position mode
single\_side: One-way mode; dual\_side: Hedge mode
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
position\_mode
string
true
Position mode
single\_side: One-way mode; dual\_side: Hedge mode
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode#request-example)
Request Example
Copy
POST https://api.sunx.io/sapi/v1/position/risk/limit?margin_mode=cross&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"position_mode": "dual_side"
}
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode#response-example)
Response Example
[PreviousGet Position Mode](https://sunx.gitbook.io/sunx/developer/rest/position/get-position-mode)
[NextGet Futures Risk Limit](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode#response-example)
Copy
{
"code": 200,
"message": "Success",
"data": {
"position_mode": "dual_side"
},
"ts": 1740463132267
}
---
# Cancel Multiple Orders | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders#sapi-v1-trade-cancel_batch_orders)
/sapi/v1/trade/cancel\_batch\_orders
Request type: POST
Signature verification: Yes
Interface permission: Trade
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Cancel orders in a batch. A maximum of 10 orders can be cancelled per request.
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
true
Symbol
order\_id
Array of string
false
Order ID
client\_order\_id
Array of string
false
Your order ID
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
order\_id
Array of string
true
Order ID
client\_order\_id
Array of string
true
Your order ID
Either order\_id or client\_order\_id is required.
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders#response-example)
Response Example
[PreviousCancel Order](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-order)
[NextCancel All](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders#response-example)
Copy
POST https://api.sunx.io/sapi/v1/trade/cancel_batch_orders?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"contract_code": "BTC-USDT",
"order_id": [\
"1417232562245373953",\
"1417232562245373952"\
]
}
Copy
{
"code": 200,
"message": "Success",
"data": [\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417232562245373953",\
"client_order_id": "1417232562245373953"\
},\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417232562245373952",\
"client_order_id": "1417232562245373952"\
}\
],
"ts": 1757936173760
}
---
# Cancel All | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all#sapi-v1-trade-cancel_all_orders)
/sapi/v1/trade/cancel\_all\_orders
Request type: POST
Signature verification: Yes
Interface permission: Trade
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Cancel all open orders.
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all#request-address)
Request Address
Environment
Address
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
Online
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
false
Symbol
side
String
false
Order side
buy; sell
position\_side
String
false
Position side
long: going long; short: going short; both: One-way mode
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
order\_id
String
true
Order ID
client\_order\_id
String
true
Your order ID
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all#response-example)
Response Example
[PreviousCancel Multiple Orders](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-multiple-orders)
[NextClose All of a Symbol at Market Price](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all#response-example)
Copy
POST https://api.sunx.io/sapi/v1/trade/cancel_all_orders?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"contract_code": "BTC-USDT",
"side": "buy",
"position_side": "long"
}
Copy
{
"code": 200,
"message": "Success",
"data": [\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417232562245373953",\
"client_order_id": "1417232562245373953"\
},\
{\
"code": 200,\
"message": "Success",\
"order_id": "1417544780581212160",\
"client_order_id": "1417544780581212160"\
}\
],
"ts": 1758014173830
}
---
# Close All of a Symbol at Market Price | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price#sapi-v1-trade-position)
/sapi/v1/trade/position
Request type: POST
Signature verification: Yes
Interface permission: Trade
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Sell designated positions at market price.
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
true
Symbol
margin\_mode
String
true
Margin mode
cross: Cross margin
position\_side
String
true
Position side
The side of your position. Under the buy/sell mode, "both" is default. Under the long/short mode, "long" refers to going long; "short" refers to going short.
client\_order\_id
String
false
Order ID you entered
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
client\_order\_id
String
false
Your order ID
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price#response-example)
Response Example
[PreviousCancel All](https://sunx.gitbook.io/sunx/developer/rest/order/cancel-all)
[NextClose All at Market Price](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-at-market-price)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price#response-example)
Copy
POST https://api.sunx.io/v5/trade/position?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
{
"contract_code": "BTC-USDT",
"margin_mode": "cross",
"position_side": "long",
"client_order_id": "1330969352647610368"
}
Copy
{
"code": 200,
"data": {
"client_order_id": "1330969352647610368",
"order_id": 1339200243479453700
},
"message": "Success",
"ts": 1739331819194
}
---
# Get KLine Data | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data#sapi-v1-market-history-kline)
/sapi/v1/market/history/kline
Request type: GET
Signature verification: No
Interface permission: Read
Rate Limit: For public interface to get market data such as Get Kline data, Get Market Data Overview, Get Contract Information,Get market in-depth data, Get premium index Kline, Get real-time forecast capital rate kline, Get basis data, Get the last Trade of a Contract and so on: (1)For restful interfaces, products, (future, coin margined swap, usdt margined Contracts)800 times/second for one IP at most
Interface description: The interface supports cross margin mode and isolated margin mode. The request parameter "contract\_code" supports the contract code of futures, in that the format is BTC-USDT-210625; and supports contract type: BTC-USDT, BTC-USDT-CW, BTC-USDT-NW, BTC-USDT-CQ, BTC-USDT-NQ.
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
string
true
contract code or contract type
swap: "BTC-USDT"... , future: "BTC-USDT-220325" ... or BTC-USDT-CW, BTC-USDT-NW, BTC-USDT-CQ, BTC-USDT-NQ
period
string
true
KLine Type
1min, 5min, 15min, 30min, 60min, 1hour,4hour,1day, 1mon
size
int
false
Acquisition Quantity
\[1,2000\]
150
from
long
false
start timestamp seconds.
to
long
false
end timestamp seconds
Notes: Either size field or from and to fields need to be filled. If size field and from/to fields are not filled, It will return error messages. If from field is filled, to field need to filled too. The api can mostly return the klines of last two years. If from to size are all filled,'from' and 'to' will be ignored.
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
ch
string
true
Data belonged channel,Format: market.period
status
string
true
Request Processing Result
ts
long
true
Time of Respond Generation, Unit: Millisecond
kline data
false
id
long
true
kline id,the same as kline timestamp, kline start timestamp
vol
decimal
true
Trade Volume(Cont.) . Sum of both buy and sell sides
count
decimal
true
Order Quantity. Sum of both buy and sell sides
open
decimal
true
Open Price
close
decimal
true
Clos Price, the price in the last kline is the latest order price
low
decimal
true
Low Price
high
decimal
true
High Price
amount
decimal
true
Trade Amount(Coin), trade amount(coin)=sum(order quantity of a single order \* face value of the coin/order price). Sum of both buy and sell sides
trade\_turnover
decimal
true
Transaction amount, that is, sum (transaction quantity \* contract face value \* transaction price). Sum of both buy and sell sides
false
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data#response-example)
Response Example
[PreviousGet Market Depth](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth)
[NextGet Market Data Overview](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data#response-example)
Copy
GET https://api.sunx.io/sapi/v1/market/history/kline?contract_code=BTC-USDT&period=1day
Copy
{
"ch": "market.BTC-USDT.kline.1day",
"ts": 1757931133018,
"status": "ok",
"data": [\
{\
"id": 1757433600,\
"open": 113608.0,\
"close": 113862.3,\
"high": 114263.7,\
"low": 113340.9,\
"amount": 1.16,\
"vol": 1160,\
"trade_turnover": 132119.9386,\
"count": 579\
},\
{\
"id": 1757520000,\
"open": 113818.2,\
"close": 114209.0,\
"high": 114682.5,\
"low": 113131.5,\
"amount": 11.132,\
"vol": 11132,\
"trade_turnover": 1268248.2292,\
"count": 5491\
}\
]
}
---
# Get Market Depth | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth#sapi-v1-market-depth)
/sapi/v1/market/depth
Request type: GET
Signature verification: No
Interface permission: Read
Rate Limit: For public interface to get market data such as Get Kline data, Get Market Data Overview, Get Contract Information,Get market in-depth data, Get premium index Kline, Get real-time forecast capital rate kline, Get basis data, Get the last Trade of a Contract and so on: (1)For restful interfaces, products, (future, coin margined swap, usdt margined Contracts)800 times/second for one IP at most
Interface description: The interface supports cross margin mode and isolated margin mode. The request parameter "contract\_code" supports the contract code of futures, in that the format is BTC-USDT-210625; and supports contract type: BTC-USDT, BTC-USDT-CW, BTC-USDT-NW, BTC-USDT-CQ, BTC-USDT-NQ.
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
string
true
swap: "BTC-USDT"... , future: "BTC-USDT-220325" ... or BTC-USDT-CW, BTC-USDT-NW, BTC-USDT-CQ, BTC-USDT-NQ
type
string
true
Get depth data within step 150, use step0, step1, step2, step3, step4, step5, step14, step15, step16, step17(merged depth data 0-5,14-17);when step is 0,depth data will not be merged; Get depth data within step 20, use step6, step7, step8, step9, step10, step11, step12, step13, step18, step19(merged depth data 7-13,18-19); when step is 6, depth data will not be merged.
Notes: step16, step17, step18, and step19 are only for SHIB-USDT contract, and the other contracts is not supported now.
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
ch
string
true
Data belonged channel,Format: market.period
status
string
true
Request Processing Result
ts
long
true
Time of Respond Generation,Unit:Millisecond
"ok" , "error"
object array
false
mrid
long
true
Order ID
id
long
true
tick ID
asks
object
false
Sell,\[price(Ask price), vol(Ask orders (cont.) )\], price in ascending sequence
bids
object
false
Buy,\[price(Bid price), vol(Bid orders(Cont.))\], Price in descending sequence
ts
long
true
Time of Respond Generation, Unit: Millisecond
version
long
true
version ID
ch
string
true
Data channel, Format: market.period
false
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth#response-example)
Response Example
[PreviousMarket Data](https://sunx.gitbook.io/sunx/developer/rest/market-data)
[NextGet KLine Data](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-depth#response-example)
Copy
GET https://api.sunx.io/sapi/v1/market/depth?contract_code=BTC-USDT&type=step0
Copy
{
"ch": "market.BTC-USDT.depth.step0",
"status": "ok",
"tick": {
"mrid": 100000019245599,
"id": 1758016468,
"bids": [\
[\
115507.7,\
41\
],\
[\
115426.9,\
4\
],\
[\
115411.9,\
4\
],\
[\
115396.9,\
4\
],\
[\
115381.9,\
4\
],\
[\
115366.9,\
4\
],\
[\
115351.9,\
5\
],\
[\
115336.9,\
4\
],\
[\
115321.9,\
4\
],\
[\
115306.9,\
4\
],\
[\
115291.9,\
4\
]\
],
"asks": [\
[\
115580.2,\
4\
],\
[\
115583.2,\
41\
],\
[\
115595.2,\
4\
],\
[\
115610.2,\
4\
],\
[\
115625.2,\
4\
],\
[\
115640.2,\
5\
],\
[\
115655.2,\
5\
],\
[\
115670.2,\
5\
],\
[\
115685.2,\
5\
],\
[\
115700.2,\
5\
],\
[\
115715.2,\
5\
]\
],
"ts": 1758016468240,
"version": 1758016468,
"ch": "market.BTC-USDT.depth.step0"
},
"ts": 1758016470037
}
---
# Get Futures Risk Limit | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit#sapi-v1-position-risk-limit)
/sapi/v1/position/risk/limit
Request type: GET
Signature verification: Yes
Interface permission: Read
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Get the Futures Risk Limit information of your current futures position.
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
String
false
Symbol
"BTC-USDT", "ETH-USDT"……
margin\_mode
String
false
Margin mode
cross: Cross margin
position\_side
String
false
Position side
long: going long; short: going short; both: One-way mode
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
contract\_code
String
true
Symbol
BTC-USDT", "ETH-USDT"……
contract\_type
String
true
Contract type
swap: Perpetual; this\_week: Weekly; next\_week: Bi-weekly; quarter: Quarterly; next\_quarter: Bi-quarterly
margin\_mode
String
true
Margin mode
cross: Cross margin
position\_side
String
true
Position side
long: going long; short: going short; both: One-way mode
max\_lever
String
true
Current maximum leverage
maintenance\_margin\_rate
String
true
Current maintenance margin ratio
max\_volume
String
true
Current maximum position Cont
min\_volume
String
true
Current minimum position Cont
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit#response-example)
Response Example
[PreviousSet Position Mode](https://sunx.gitbook.io/sunx/developer/rest/position/set-position-mode)
[NextGet Information On Position Limit](https://sunx.gitbook.io/sunx/developer/rest/position/get-information-on-position-limit)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/position/get-futures-risk-limit#response-example)
Copy
GET https://api.sunx.io/sapi/v1/position/risk/limit?contract_code=BTC-USDT&SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
Copy
{
"code": 200,
"message": "Success",
"data": [\
{\
"contract_code": "BTC-USDT",\
"margin_mode": "cross",\
"position_side": "short",\
"max_lever": "200",\
"maintenance_margin_rate": "0.003850000000000000",\
"max_volume": "400.000000000000000000",\
"min_volume": "1.000000000000000000"\
}\
],
"ts": 1740453921437
}
---
# Close All at Market Price | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-at-market-price#sapi-v1-trade-position_all)
/sapi/v1/trade/position\_all
Request type: POST
Signature verification: Yes
Interface permission: Trade
Rate Limit: Generally, the private interface rate limit of API key is at most 144 times every 3 seconds for each account (Trade Interface: at most 72 times every 3 seconds. Read Interface: at most 72 times every 3 seconds) (this rate limit is shared by all the altcoins contracts delivered by different date).
Interface description: Sell all positions at market price.
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-at-market-price#request-address)
Request Address
Environment
Address
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
Online
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-at-market-price#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
order\_id
String
true
Order ID (UUID
client\_order\_id
String
false
Your order ID
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-at-market-price#request-example)
Request Example
Copy
POST https://api.sunx.io/sapi/v1/trade/position_all?SignatureVersion=2&SignatureVersion=2&AccessKeyId=&Signature=&SignatureMethod=HmacSHA256&Timestamp=2025-09-16T07%3A16%3A15
###
[](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-at-market-price#response-example)
Response Example
[PreviousClose All of a Symbol at Market Price](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-of-a-symbol-at-market-price)
[NextGet Current Orders](https://sunx.gitbook.io/sunx/developer/rest/order/get-current-orders)
Last updated 24 days ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-at-market-price#request-address)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-at-market-price#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-at-market-price#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/order/close-all-at-market-price#response-example)
Copy
{
"code": 200,
"data": [\
{\
"client_order_id": 1339201278633681000,\
"code": 200,\
"message": "Success",\
"order_id": 1339201278633681000\
}\
],
"message": "Success",
"ts": 1739332065995
}
---
# Get Market BBO Data | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data#sapi-v1-market-bbo)
/sapi/v1/market/bbo
Request type: GET
Signature verification: No
Interface permission: Read
Rate Limit: For public interface to get market data such as Get Kline data, Get Market Data Overview, Get Contract Information,Get market in-depth data, Get premium index Kline, Get real-time forecast capital rate kline, Get basis data, Get the last Trade of a Contract and so on: (1)For restful interfaces, products, (future, coin margined swap, usdt margined Contracts)800 times/second for one IP at most
Interface description: he interface supports cross margin mode and isolated margin mode. The request parameter "contract\_code" supports the contract code of futures, in that the format is BTC-USDT-210625; and supports contract type: BTC-USDT, BTC-USDT-CW, BTC-USDT-NW, BTC-USDT-CQ, BTC-USDT-NQ. business\_type is a required parameter when query info of futures contract, and its value must be futures or all.
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
string
false
contract code or contract type
swap: "BTC-USDT"... , future: "BTC-USDT-220325" ... or BTC-USDT-CW, BTC-USDT-NW, BTC-USDT-CQ, BTC-USDT-NQ
business\_type
string
false
business type, default is swap
futures, swap, all
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
status
string
true
the result of server handling to request
"ok" , "error"
object array
true
contract\_code
string
true
contract code or contract type
swap: "BTC-USDT"... , future: "BTC-USDT-220325" ... or BTC-USDT-CW, BTC-USDT-NW, BTC-USDT-CQ, BTC-USDT-NQ
business\_type
string
true
business type
futures, swap
mrid
long
true
Match ID, unique identification
ask
array
false
\[Ask 1 price, Ask 1 qty (cont)\]
bid
array
false
\[Bid 1 price, Bid 1 qty (cont)\]
ts
long
true
The system detects the orderbook time point, unit: milliseconds
false
ts
long
true
Time of Respond Generation, Unit: Millisecond
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data#response-example)
Response Example
[PreviousGet The Last Trade of a Contract](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-the-last-trade-of-a-contract)
[NextGet a Batch of Trade Records of a Contract](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-a-batch-of-trade-records-of-a-contract)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-bbo-data#response-example)
Copy
GET https://api.sunx.io/sapi/v1/market/bbo?contract_code=BTC-USDT
Copy
{
"status": "ok",
"ticks": [\
{\
"trade_partition": "USDT",\
"business_type": "swap",\
"contract_code": "BTC-USDT",\
"ask": [\
114881.2,\
34\
],\
"bid": [\
114860.2,\
5\
],\
"mrid": 100000016261408,\
"ts": 1757931638127\
}\
],
"ts": 1757931643221
}
---
# Get Market Data Overview | SunX
####
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview#sapi-v1-market-detail-merged)
/sapi/v1/market/detail/merged
Request type: GET
Signature verification: No
Interface permission: Read
Rate Limit: For public interface to get market data such as Get Kline data, Get Market Data Overview, Get Contract Information,Get market in-depth data, Get premium index Kline, Get real-time forecast capital rate kline, Get basis data, Get the last Trade of a Contract and so on: (1)For restful interfaces, products, (future, coin margined swap, usdt margined Contracts)800 times/second for one IP at most
Interface description: The interface supports cross margin mode and isolated margin mode. The request parameter "contract\_code" supports the contract code of futures, in that the format is BTC-USDT-210625; and supports contract type: BTC-USDT, BTC-USDT-CW, BTC-USDT-NW, BTC-USDT-CQ, BTC-USDT-NQ.
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview#request-address)
Request Address
Environment
Address
Online
[https://api.sunx.io](https://api.sunx.io/)
Online (preferred by aws customers)
[https://api.sunx.io](https://api.sunx.io/)
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview#request-parameter)
Request Parameter
Parameter
Data Type
Required
Description
Value Range
Default Value
contract\_code
string
true
contract code or contract type
swap: "BTC-USDT"... , future: "BTC-USDT-220325" ... or BTC-USDT-CW, BTC-USDT-NW, BTC-USDT-CQ, BTC-USDT-NQ
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview#response-parameter)
Response Parameter
Parameter
Data Type
Required
Description
Value Range
ch
string
true
Data belonged channel,format: market.$contract\_code.detail.merged
status
string
true
Request Processing Result
"ok" , "error"
ts
long
true
Time of Respond Generation, Unit: Millisecond
object
true
kline data (Start at 00:00(UTC+8) of the day)
id
long
true
kline id,the same as kline timestamp
vol
string
true
Trade Volume(Cont.), from nowtime - 24 hours. Sum of both buy and sell sides
count
decimal
true
Order Quantity, from nowtime - 24 hours. Sum of both buy and sell sides
open
string
true
Opening Price
close
string
true
Closing Price, the price in the last kline is the latest order price
low
string
true
Low
high
string
true
High
amount
string
true
Trade Amount(Coin), trade amount(coin)=sum(order quantity of a single order \* face value of the coin/order price),from nowtime - 24 hours. Sum of both buy and sell sides
ask
array
true
Sell,\[price(Ask price), vol(Ask orders (cont.) )\], price in ascending sequence
bid
array
true
Buy,\[price(Bid price), vol(Bid orders(Cont.))\], Price in descending sequence
trade\_turnover
string
true
Transaction amount, that is, sum (transaction quantity \* contract face value \* transaction price),from nowtime - 24 hours. Sum of both buy and sell sides
ts
long
true
Timestamp
false
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview#request-example)
Request Example
###
[](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview#response-example)
Response Example
[PreviousGet KLine Data](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-kline-data)
[NextGet The Last Trade of a Contract](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-the-last-trade-of-a-contract)
Last updated 1 month ago
* [Request Address](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview#request-address)
* [Request Parameter](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview#request-parameter)
* [Response Parameter](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview#response-parameter)
* [Request Example](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview#request-example)
* [Response Example](https://sunx.gitbook.io/sunx/developer/rest/market-data/get-market-data-overview#response-example)
Copy
GET https://api.sunx.io/sapi/v1/market/detail/merged?contract_code=BTC-USDT
Copy
{
"ch": "market.BTC-USDT.detail.merged",
"status": "ok",
"tick": {
"amount": "12.526",
"ask": [\
13084.2,\
131\
],
"bid": [\
13082.9,\
38\
],
"close": "13076.8",
"count": 2920,
"high": "13205.3",
"id": 1603695162,
"low": "12877.5",
"open": "12916.2",
"trade_turnover": "163247.3982",
"ts": 1603695162580,
"vol": "12526"
},
"ts": 1603695162580
}
---