From 75d9061799dfb6cd8a87548b3a171816b7d5a184 Mon Sep 17 00:00:00 2001 From: "ivan.z-apx" Date: Thu, 28 May 2026 09:58:33 +0800 Subject: [PATCH 1/3] add deposit withdraw --- V3(Recommended)/EN/aster-chain.md | 436 ++++++++++++++++++ .../aster-chain_CN.md" | 436 ++++++++++++++++++ 2 files changed, 872 insertions(+) diff --git a/V3(Recommended)/EN/aster-chain.md b/V3(Recommended)/EN/aster-chain.md index 95c2594..b51579f 100644 --- a/V3(Recommended)/EN/aster-chain.md +++ b/V3(Recommended)/EN/aster-chain.md @@ -17,6 +17,20 @@ - [Deposit Stake (TRADE)](#deposit-stake-trade) - [Update Lock Period (TRADE)](#update-lock-period-trade) - [Claim Rewards (TRADE)](#claim-rewards-trade) +- [Aster-Chain Perp Withdraw & Transfer Endpoints](#aster-chain-perp-withdraw--transfer-endpoints) + - [User Withdraw (WITHDRAW)](#user-withdraw-withdraw) + - [User Solana Withdraw (WITHDRAW)](#user-solana-withdraw-withdraw) + - [Get Withdraw Info (USER_DATA)](#get-withdraw-info-user_data) + - [Deposit/Withdraw History (USER_DATA)](#depositwithdraw-history-user_data) + - [Wallet Transfer (TRADE)](#wallet-transfer-trade) + - [Transfer History (USER_DATA)](#transfer-history-user_data) +- [Aster-Chain Spot Withdraw & Transfer Endpoints](#aster-chain-spot-withdraw--transfer-endpoints) + - [User Withdraw (WITHDRAW)](#user-withdraw-withdraw-1) + - [User Solana Withdraw (WITHDRAW)](#user-solana-withdraw-withdraw-1) + - [Get Withdraw Info (USER_DATA)](#get-withdraw-info-user_data-1) + - [Deposit/Withdraw History (USER_DATA)](#depositwithdraw-history-user_data-1) + - [Wallet Transfer (TRADE)](#wallet-transfer-trade-1) + - [Transfer History (USER_DATA)](#transfer-history-user_data-1) --- @@ -299,3 +313,425 @@ Claim accumulated staking rewards. The on-chain action type is `TokenDelegate` ( | nonce | LONG | YES | Microsecond timestamp | | user | STRING | YES | Source account wallet address | | signature | STRING | YES | EIP-712 signature, signed with the `user` account's wallet private key | + +--- + +# Aster-Chain Perp Withdraw & Transfer Endpoints + +## User Withdraw (WITHDRAW) + +> **Response:** + +```javascript +{ + "withdrawId": "987654321", + "hash": "0xabc123..." +} +``` + +`POST /aster-chain/v3/perp/user-withdraw` + +Submit a withdrawal request from the perp account to an on-chain address. + +**Weight:** 5 + +**Parameters:** + +| Name | Type | Mandatory | Description | +|------|------|-----------|-------------| +| asset | STRING | YES | Asset name (e.g. `"USDT"`) | +| chainId | INTEGER | YES | Target chain ID | +| amount | STRING | YES | Withdrawal amount | +| fee | STRING | YES | Withdrawal fee | +| receiver | STRING | YES | Recipient on-chain address | +| userNonce | STRING | YES | User-side nonce included in the signature | +| userSignature | STRING | YES | User signature over the withdrawal parameters | + +--- + +## User Solana Withdraw (WITHDRAW) + +> **Response:** + +```javascript +{ + "withdrawId": "987654321", + "hash": "0xabc123..." +} +``` + +`POST /aster-chain/v3/perp/user-solana-withdraw` + +Submit a withdrawal request from the perp account to a Solana address. + +**Weight:** 5 + +**Parameters:** + +| Name | Type | Mandatory | Description | +|------|------|-----------|-------------| +| asset | STRING | YES | Asset name (e.g. `"USDT"`) | +| chainId | INTEGER | YES | Target chain ID | +| amount | STRING | YES | Withdrawal amount | +| fee | STRING | YES | Withdrawal fee | +| receiver | STRING | YES | Recipient Solana address | +| userNonce | STRING | YES | User-side nonce included in the signature | +| userSignature | STRING | YES | User signature over the withdrawal parameters | + +--- + +## Get Withdraw Info (USER_DATA) + +> **Response:** + +```javascript +{ + "userDailyLimit": "10000", + "userRemainingDailyLimit": "9500", + "totalDailyLimit": "100000", + "totalRemainingDailyLimit": "95000", + "balances": { + "USDT": { + "currency": "USDT", + "spotTotalWithdrawAmount": "0", + "perpTotalWithdrawAmount": "500", + "dailyLimit": "5000", + "chainBalances": { + "1": { + "chainId": 1, + "spotMaxWithdrawAmount": "1000", + "perpMaxWithdrawAmount": "4500", + "chainLimit": "5000", + "withdrawFee": "0.5" + } + } + } + } +} +``` + +`GET /aster-chain/v3/perp/user-withdraw-info` + +Query the current user's withdrawal limits and available balances per asset and chain. + +**Weight:** 1 + +**Parameters:** + +None + +--- + +## Deposit/Withdraw History (USER_DATA) + +> **Response:** + +```javascript +[ + { + "id": "12345", + "type": "WITHDRAW", // "DEPOSIT" or "WITHDRAW" + "asset": "USDT", + "amount": "100", + "state": "COMPLETED", + "txHash": "0xabc123...", + "time": 1699900800000, + "chainId": 1, + "accountType": "perp" + } +] +``` + +`GET /aster-chain/v3/perp/deposit-withdraw-history` + +Query the deposit and withdrawal history for the current user's perp account. + +**Weight:** 5 + +**Parameters:** + +| Name | Type | Mandatory | Description | +|------|------|-----------|-------------| +| chainId | STRING | NO | Filter records by chain ID | + +--- + +## Wallet Transfer (TRADE) + +> **Response:** + +```javascript +{ + "tranId": 123456789, + "status": "SUCCESS" +} +``` + +`POST /aster-chain/v3/perp/wallet/transfer` + +Transfer assets between the spot wallet and the perp account. + +**Weight:** 5 + +**Parameters:** + +| Name | Type | Mandatory | Description | +|------|------|-----------|-------------| +| asset | STRING | YES | Asset name (e.g. `"USDT"`) | +| amount | DECIMAL | YES | Transfer amount, must be greater than 0 | +| clientTranId | STRING | YES | Client-defined transfer ID | +| kindType | STRING | YES | Transfer direction: `"SPOT_FUTURE"` (spot → perp) or `"FUTURE_SPOT"` (perp → spot) | +| nonce | LONG | YES | Microsecond timestamp | +| user | STRING | YES | Source account wallet address | +| signature | STRING | YES | EIP-712 signature, signed with the `user` account's wallet private key | + +--- + +## Transfer History (USER_DATA) + +> **Response:** + +```javascript +{ + "total": 2, + "rows": [ + { + "asset": "USDT", + "tranId": 123456789, + "amount": "100", + "kindType": "SPOT_FUTURE", // "SPOT_FUTURE" or "FUTURE_SPOT" + "createTime": 1699900800000, + "updateTime": 1699900810000, + "status": "SUCCESS" // "SUCCESS", "FAIL", or "PENDING" + } + ] +} +``` + +`GET /aster-chain/v3/perp/transfer/history` + +Query the wallet transfer history between spot and perp for the current user. + +**Weight:** 5 + +**Parameters:** + +| Name | Type | Mandatory | Description | +|------|------|-----------|-------------| +| asset | STRING | NO | Filter by asset name | +| startTime | LONG | NO | Start time in milliseconds | +| endTime | LONG | NO | End time in milliseconds (defaults to current time) | +| page | INTEGER | NO | Page number, default `1` | +| pageSize | INTEGER | NO | Records per page, default `10`, max `100` | +| order | STRING | NO | Sort order: `"ASC"` or `"DESC"` (default `"DESC"`) | + +--- + +# Aster-Chain Spot Withdraw & Transfer Endpoints + +## User Withdraw (WITHDRAW) + +> **Response:** + +```javascript +{ + "withdrawId": "987654321", + "hash": "0xabc123..." +} +``` + +`POST /aster-chain/v3/spot/user-withdraw` + +Submit a withdrawal request from the spot account to an on-chain address. + +**Weight:** 5 + +**Parameters:** + +| Name | Type | Mandatory | Description | +|------|------|-----------|-------------| +| asset | STRING | YES | Asset name (e.g. `"USDT"`) | +| chainId | INTEGER | YES | Target chain ID | +| amount | STRING | YES | Withdrawal amount | +| fee | STRING | YES | Withdrawal fee | +| receiver | STRING | YES | Recipient on-chain address | +| userNonce | STRING | YES | User-side nonce included in the signature | +| userSignature | STRING | YES | User signature over the withdrawal parameters | + +--- + +## User Solana Withdraw (WITHDRAW) + +> **Response:** + +```javascript +{ + "withdrawId": "987654321", + "hash": "0xabc123..." +} +``` + +`POST /aster-chain/v3/spot/user-solana-withdraw` + +Submit a withdrawal request from the spot account to a Solana address. + +**Weight:** 5 + +**Parameters:** + +| Name | Type | Mandatory | Description | +|------|------|-----------|-------------| +| asset | STRING | YES | Asset name (e.g. `"USDT"`) | +| chainId | INTEGER | YES | Target chain ID | +| amount | DECIMAL | YES | Withdrawal amount | +| fee | DECIMAL | YES | Withdrawal fee | +| receiver | STRING | YES | Recipient Solana address | +| userNonce | STRING | YES | User-side nonce included in the signature | +| userSignature | STRING | YES | User signature over the withdrawal parameters | + +--- + +## Get Withdraw Info (USER_DATA) + +> **Response:** + +```javascript +{ + "userDailyLimit": "10000", + "userRemainingDailyLimit": "9500", + "totalDailyLimit": "100000", + "totalRemainingDailyLimit": "95000", + "balances": { + "USDT": { + "currency": "USDT", + "spotTotalWithdrawAmount": "500", + "perpTotalWithdrawAmount": "0", + "dailyLimit": "5000", + "chainBalances": { + "1": { + "chainId": 1, + "spotMaxWithdrawAmount": "4500", + "perpMaxWithdrawAmount": "1000", + "chainLimit": "5000", + "withdrawFee": "0.5" + } + } + } + } +} +``` + +`GET /aster-chain/v3/spot/user-withdraw-info` + +Query the current user's withdrawal limits and available balances per asset and chain for the spot account. + +**Weight:** 1 + +**Parameters:** + +None + +--- + +## Deposit/Withdraw History (USER_DATA) + +> **Response:** + +```javascript +[ + { + "id": "12345", + "type": "WITHDRAW", // "DEPOSIT" or "WITHDRAW" + "asset": "USDT", + "amount": "100", + "state": "COMPLETED", + "txHash": "0xabc123...", + "time": 1699900800000, + "chainId": 1, + "accountType": "spot" + } +] +``` + +`GET /aster-chain/v3/spot/deposit-withdraw-history` + +Query the deposit and withdrawal history for the current user's spot account. + +**Weight:** 5 + +**Parameters:** + +| Name | Type | Mandatory | Description | +|------|------|-----------|-------------| +| chainId | STRING | NO | Filter records by chain ID | + +--- + +## Wallet Transfer (TRADE) + +> **Response:** + +```javascript +{ + "tranId": 123456789, + "status": "SUCCESS" +} +``` + +`POST /aster-chain/v3/spot/wallet/transfer` + +Transfer assets between the spot wallet and the perp account. + +**Weight:** 5 + +**Parameters:** + +| Name | Type | Mandatory | Description | +|------|------|-----------|-------------| +| asset | STRING | YES | Asset name (e.g. `"USDT"`) | +| amount | DECIMAL | YES | Transfer amount, must be greater than 0 | +| clientTranId | STRING | YES | Client-defined transfer ID | +| kindType | STRING | YES | Transfer direction: `"SPOT_FUTURE"` (spot → perp) or `"FUTURE_SPOT"` (perp → spot) | +| nonce | LONG | YES | Microsecond timestamp | +| user | STRING | YES | Source account wallet address | +| signature | STRING | YES | EIP-712 signature, signed with the `user` account's wallet private key | + +--- + +## Transfer History (USER_DATA) + +> **Response:** + +```javascript +{ + "total": 2, + "rows": [ + { + "asset": "USDT", + "tranId": 123456789, + "amount": "100", + "kindType": "SPOT_FUTURE", // "SPOT_FUTURE" or "FUTURE_SPOT" + "createTime": 1699900800000, + "updateTime": 1699900810000, + "status": "SUCCESS" // "SUCCESS", "FAIL", or "PENDING" + } + ] +} +``` + +`GET /aster-chain/v3/spot/transfer/history` + +Query the wallet transfer history between spot and perp for the current user. + +**Weight:** 5 + +**Parameters:** + +| Name | Type | Mandatory | Description | +|------|------|-----------|-------------| +| asset | STRING | NO | Filter by asset name | +| startTime | LONG | NO | Start time in milliseconds | +| endTime | LONG | NO | End time in milliseconds (defaults to current time) | +| page | INTEGER | NO | Page number, default `1` | +| pageSize | INTEGER | NO | Records per page, default `10`, max `100` | +| order | STRING | NO | Sort order: `"ASC"` or `"DESC"` (default `"DESC"`) | diff --git "a/V3(Recommended)/\344\270\255\346\226\207/aster-chain_CN.md" "b/V3(Recommended)/\344\270\255\346\226\207/aster-chain_CN.md" index 6582338..bf1a9a0 100644 --- "a/V3(Recommended)/\344\270\255\346\226\207/aster-chain_CN.md" +++ "b/V3(Recommended)/\344\270\255\346\226\207/aster-chain_CN.md" @@ -17,6 +17,20 @@ - [追加质押 (TRADE)](#追加质押-trade) - [更新锁定期 (TRADE)](#更新锁定期-trade) - [领取奖励 (TRADE)](#领取奖励-trade) +- [Aster-Chain 合约提现与划转接口](#aster-chain-合约提现与划转接口) + - [合约提现 (WITHDRAW)](#合约提现-withdraw) + - [合约 Solana 提现 (WITHDRAW)](#合约-solana-提现-withdraw) + - [查询提现信息 (USER_DATA)](#查询提现信息-user_data) + - [充提记录 (USER_DATA)](#充提记录-user_data) + - [钱包划转 (TRADE)](#钱包划转-trade) + - [划转记录 (USER_DATA)](#划转记录-user_data) +- [Aster-Chain 现货提现与划转接口](#aster-chain-现货提现与划转接口) + - [现货提现 (WITHDRAW)](#现货提现-withdraw) + - [现货 Solana 提现 (WITHDRAW)](#现货-solana-提现-withdraw) + - [查询提现信息 (USER_DATA)](#查询提现信息-user_data-1) + - [充提记录 (USER_DATA)](#充提记录-user_data-1) + - [钱包划转 (TRADE)](#钱包划转-trade-1) + - [划转记录 (USER_DATA)](#划转记录-user_data-1) --- @@ -299,3 +313,425 @@ | nonce | LONG | YES | 微秒时间戳 | | user | STRING | YES | 发起账户钱包地址 | | signature | STRING | YES | EIP-712 签名,使用 `user` 账户的钱包私钥签名 | + +--- + +# Aster-Chain 合约提现与划转接口 + +## 合约提现 (WITHDRAW) + +> **响应:** + +```javascript +{ + "withdrawId": "987654321", + "hash": "0xabc123..." +} +``` + +`POST /aster-chain/v3/perp/user-withdraw` + +从合约账户提现至链上地址。 + +**权重:** 5 + +**参数:** + +| 名称 | 类型 | 是否必需 | 描述 | +|------|------|---------|------| +| asset | STRING | YES | 资产名称(如 `"USDT"`) | +| chainId | INTEGER | YES | 目标链 ID | +| amount | STRING | YES | 提现金额 | +| fee | STRING | YES | 提现手续费 | +| receiver | STRING | YES | 接收方链上地址 | +| userNonce | STRING | YES | 签名中包含的用户端 nonce | +| userSignature | STRING | YES | 用户对提现参数的签名 | + +--- + +## 合约 Solana 提现 (WITHDRAW) + +> **响应:** + +```javascript +{ + "withdrawId": "987654321", + "hash": "0xabc123..." +} +``` + +`POST /aster-chain/v3/perp/user-solana-withdraw` + +从合约账户提现至 Solana 地址。 + +**权重:** 5 + +**参数:** + +| 名称 | 类型 | 是否必需 | 描述 | +|------|------|---------|------| +| asset | STRING | YES | 资产名称(如 `"USDT"`) | +| chainId | INTEGER | YES | 目标链 ID | +| amount | STRING | YES | 提现金额 | +| fee | STRING | YES | 提现手续费 | +| receiver | STRING | YES | 接收方 Solana 地址 | +| userNonce | STRING | YES | 签名中包含的用户端 nonce | +| userSignature | STRING | YES | 用户对提现参数的签名 | + +--- + +## 查询提现信息 (USER_DATA) + +> **响应:** + +```javascript +{ + "userDailyLimit": "10000", + "userRemainingDailyLimit": "9500", + "totalDailyLimit": "100000", + "totalRemainingDailyLimit": "95000", + "balances": { + "USDT": { + "currency": "USDT", + "spotTotalWithdrawAmount": "0", + "perpTotalWithdrawAmount": "500", + "dailyLimit": "5000", + "chainBalances": { + "1": { + "chainId": 1, + "spotMaxWithdrawAmount": "1000", + "perpMaxWithdrawAmount": "4500", + "chainLimit": "5000", + "withdrawFee": "0.5" + } + } + } + } +} +``` + +`GET /aster-chain/v3/perp/user-withdraw-info` + +查询当前用户各资产、各链的提现限额及可用余额。 + +**权重:** 1 + +**参数:** + +无 + +--- + +## 充提记录 (USER_DATA) + +> **响应:** + +```javascript +[ + { + "id": "12345", + "type": "WITHDRAW", // "DEPOSIT" 或 "WITHDRAW" + "asset": "USDT", + "amount": "100", + "state": "COMPLETED", + "txHash": "0xabc123...", + "time": 1699900800000, + "chainId": 1, + "accountType": "perp" + } +] +``` + +`GET /aster-chain/v3/perp/deposit-withdraw-history` + +查询当前用户合约账户的充值与提现历史记录。 + +**权重:** 5 + +**参数:** + +| 名称 | 类型 | 是否必需 | 描述 | +|------|------|---------|------| +| chainId | STRING | NO | 按链 ID 过滤记录 | + +--- + +## 钱包划转 (TRADE) + +> **响应:** + +```javascript +{ + "tranId": 123456789, + "status": "SUCCESS" +} +``` + +`POST /aster-chain/v3/perp/wallet/transfer` + +在现货钱包与合约账户之间划转资产。 + +**权重:** 5 + +**参数:** + +| 名称 | 类型 | 是否必需 | 描述 | +|------|------|---------|------| +| asset | STRING | YES | 资产名称(如 `"USDT"`) | +| amount | DECIMAL | YES | 划转金额,必须大于 0 | +| clientTranId | STRING | YES | 客户端自定义划转 ID | +| kindType | STRING | YES | 划转方向:`"SPOT_FUTURE"`(现货 → 合约)或 `"FUTURE_SPOT"`(合约 → 现货) | +| nonce | LONG | YES | 微秒时间戳 | +| user | STRING | YES | 发起账户钱包地址 | +| signature | STRING | YES | EIP-712 签名,使用 `user` 账户的钱包私钥签名 | + +--- + +## 划转记录 (USER_DATA) + +> **响应:** + +```javascript +{ + "total": 2, + "rows": [ + { + "asset": "USDT", + "tranId": 123456789, + "amount": "100", + "kindType": "SPOT_FUTURE", // "SPOT_FUTURE" 或 "FUTURE_SPOT" + "createTime": 1699900800000, + "updateTime": 1699900810000, + "status": "SUCCESS" // "SUCCESS"、"FAIL" 或 "PENDING" + } + ] +} +``` + +`GET /aster-chain/v3/perp/transfer/history` + +查询当前用户现货与合约间的划转历史记录。 + +**权重:** 5 + +**参数:** + +| 名称 | 类型 | 是否必需 | 描述 | +|------|------|---------|------| +| asset | STRING | NO | 按资产名称过滤 | +| startTime | LONG | NO | 起始时间(毫秒) | +| endTime | LONG | NO | 结束时间(毫秒),默认为当前时间 | +| page | INTEGER | NO | 页码,默认 `1` | +| pageSize | INTEGER | NO | 每页记录数,默认 `10`,最大 `100` | +| order | STRING | NO | 排序方式:`"ASC"` 或 `"DESC"`(默认 `"DESC"`) | + +--- + +# Aster-Chain 现货提现与划转接口 + +## 现货提现 (WITHDRAW) + +> **响应:** + +```javascript +{ + "withdrawId": "987654321", + "hash": "0xabc123..." +} +``` + +`POST /aster-chain/v3/spot/user-withdraw` + +从现货账户提现至链上地址。 + +**权重:** 5 + +**参数:** + +| 名称 | 类型 | 是否必需 | 描述 | +|------|------|---------|------| +| asset | STRING | YES | 资产名称(如 `"USDT"`) | +| chainId | INTEGER | YES | 目标链 ID | +| amount | STRING | YES | 提现金额 | +| fee | STRING | YES | 提现手续费 | +| receiver | STRING | YES | 接收方链上地址 | +| userNonce | STRING | YES | 签名中包含的用户端 nonce | +| userSignature | STRING | YES | 用户对提现参数的签名 | + +--- + +## 现货 Solana 提现 (WITHDRAW) + +> **响应:** + +```javascript +{ + "withdrawId": "987654321", + "hash": "0xabc123..." +} +``` + +`POST /aster-chain/v3/spot/user-solana-withdraw` + +从现货账户提现至 Solana 地址。 + +**权重:** 5 + +**参数:** + +| 名称 | 类型 | 是否必需 | 描述 | +|------|------|---------|------| +| asset | STRING | YES | 资产名称(如 `"USDT"`) | +| chainId | INTEGER | YES | 目标链 ID | +| amount | DECIMAL | YES | 提现金额 | +| fee | DECIMAL | YES | 提现手续费 | +| receiver | STRING | YES | 接收方 Solana 地址 | +| userNonce | STRING | YES | 签名中包含的用户端 nonce | +| userSignature | STRING | YES | 用户对提现参数的签名 | + +--- + +## 查询提现信息 (USER_DATA) + +> **响应:** + +```javascript +{ + "userDailyLimit": "10000", + "userRemainingDailyLimit": "9500", + "totalDailyLimit": "100000", + "totalRemainingDailyLimit": "95000", + "balances": { + "USDT": { + "currency": "USDT", + "spotTotalWithdrawAmount": "500", + "perpTotalWithdrawAmount": "0", + "dailyLimit": "5000", + "chainBalances": { + "1": { + "chainId": 1, + "spotMaxWithdrawAmount": "4500", + "perpMaxWithdrawAmount": "1000", + "chainLimit": "5000", + "withdrawFee": "0.5" + } + } + } + } +} +``` + +`GET /aster-chain/v3/spot/user-withdraw-info` + +查询当前用户现货账户各资产、各链的提现限额及可用余额。 + +**权重:** 1 + +**参数:** + +无 + +--- + +## 充提记录 (USER_DATA) + +> **响应:** + +```javascript +[ + { + "id": "12345", + "type": "WITHDRAW", // "DEPOSIT" 或 "WITHDRAW" + "asset": "USDT", + "amount": "100", + "state": "COMPLETED", + "txHash": "0xabc123...", + "time": 1699900800000, + "chainId": 1, + "accountType": "spot" + } +] +``` + +`GET /aster-chain/v3/spot/deposit-withdraw-history` + +查询当前用户现货账户的充值与提现历史记录。 + +**权重:** 5 + +**参数:** + +| 名称 | 类型 | 是否必需 | 描述 | +|------|------|---------|------| +| chainId | STRING | NO | 按链 ID 过滤记录 | + +--- + +## 钱包划转 (TRADE) + +> **响应:** + +```javascript +{ + "tranId": 123456789, + "status": "SUCCESS" +} +``` + +`POST /aster-chain/v3/spot/wallet/transfer` + +在现货钱包与合约账户之间划转资产。 + +**权重:** 5 + +**参数:** + +| 名称 | 类型 | 是否必需 | 描述 | +|------|------|---------|------| +| asset | STRING | YES | 资产名称(如 `"USDT"`) | +| amount | DECIMAL | YES | 划转金额,必须大于 0 | +| clientTranId | STRING | YES | 客户端自定义划转 ID | +| kindType | STRING | YES | 划转方向:`"SPOT_FUTURE"`(现货 → 合约)或 `"FUTURE_SPOT"`(合约 → 现货) | +| nonce | LONG | YES | 微秒时间戳 | +| user | STRING | YES | 发起账户钱包地址 | +| signature | STRING | YES | EIP-712 签名,使用 `user` 账户的钱包私钥签名 | + +--- + +## 划转记录 (USER_DATA) + +> **响应:** + +```javascript +{ + "total": 2, + "rows": [ + { + "asset": "USDT", + "tranId": 123456789, + "amount": "100", + "kindType": "SPOT_FUTURE", // "SPOT_FUTURE" 或 "FUTURE_SPOT" + "createTime": 1699900800000, + "updateTime": 1699900810000, + "status": "SUCCESS" // "SUCCESS"、"FAIL" 或 "PENDING" + } + ] +} +``` + +`GET /aster-chain/v3/spot/transfer/history` + +查询当前用户现货与合约间的划转历史记录。 + +**权重:** 5 + +**参数:** + +| 名称 | 类型 | 是否必需 | 描述 | +|------|------|---------|------| +| asset | STRING | NO | 按资产名称过滤 | +| startTime | LONG | NO | 起始时间(毫秒) | +| endTime | LONG | NO | 结束时间(毫秒),默认为当前时间 | +| page | INTEGER | NO | 页码,默认 `1` | +| pageSize | INTEGER | NO | 每页记录数,默认 `10`,最大 `100` | +| order | STRING | NO | 排序方式:`"ASC"` 或 `"DESC"`(默认 `"DESC"`) | From c098a8a2ecf43f11f8caec5bb607cb2f04da9c1d Mon Sep 17 00:00:00 2001 From: "ivan.z-apx" Date: Thu, 28 May 2026 16:52:13 +0800 Subject: [PATCH 2/3] remove transfer history, add estimate withdraw fee Co-Authored-By: Claude Sonnet 4.6 --- V3(Recommended)/EN/aster-chain.md | 124 ++------------ .../aster-chain_CN.md" | 158 ++---------------- 2 files changed, 32 insertions(+), 250 deletions(-) diff --git a/V3(Recommended)/EN/aster-chain.md b/V3(Recommended)/EN/aster-chain.md index b51579f..763a763 100644 --- a/V3(Recommended)/EN/aster-chain.md +++ b/V3(Recommended)/EN/aster-chain.md @@ -23,14 +23,12 @@ - [Get Withdraw Info (USER_DATA)](#get-withdraw-info-user_data) - [Deposit/Withdraw History (USER_DATA)](#depositwithdraw-history-user_data) - [Wallet Transfer (TRADE)](#wallet-transfer-trade) - - [Transfer History (USER_DATA)](#transfer-history-user_data) - [Aster-Chain Spot Withdraw & Transfer Endpoints](#aster-chain-spot-withdraw--transfer-endpoints) - [User Withdraw (WITHDRAW)](#user-withdraw-withdraw-1) - [User Solana Withdraw (WITHDRAW)](#user-solana-withdraw-withdraw-1) - - [Get Withdraw Info (USER_DATA)](#get-withdraw-info-user_data-1) - - [Deposit/Withdraw History (USER_DATA)](#depositwithdraw-history-user_data-1) - [Wallet Transfer (TRADE)](#wallet-transfer-trade-1) - - [Transfer History (USER_DATA)](#transfer-history-user_data-1) +- [Aster-Chain Withdraw Endpoints](#aster-chain-withdraw-endpoints) + - [Estimate Withdraw Fee (NONE)](#estimate-withdraw-fee-none) --- @@ -487,46 +485,6 @@ Transfer assets between the spot wallet and the perp account. --- -## Transfer History (USER_DATA) - -> **Response:** - -```javascript -{ - "total": 2, - "rows": [ - { - "asset": "USDT", - "tranId": 123456789, - "amount": "100", - "kindType": "SPOT_FUTURE", // "SPOT_FUTURE" or "FUTURE_SPOT" - "createTime": 1699900800000, - "updateTime": 1699900810000, - "status": "SUCCESS" // "SUCCESS", "FAIL", or "PENDING" - } - ] -} -``` - -`GET /aster-chain/v3/perp/transfer/history` - -Query the wallet transfer history between spot and perp for the current user. - -**Weight:** 5 - -**Parameters:** - -| Name | Type | Mandatory | Description | -|------|------|-----------|-------------| -| asset | STRING | NO | Filter by asset name | -| startTime | LONG | NO | Start time in milliseconds | -| endTime | LONG | NO | End time in milliseconds (defaults to current time) | -| page | INTEGER | NO | Page number, default `1` | -| pageSize | INTEGER | NO | Records per page, default `10`, max `100` | -| order | STRING | NO | Sort order: `"ASC"` or `"DESC"` (default `"DESC"`) | - ---- - # Aster-Chain Spot Withdraw & Transfer Endpoints ## User Withdraw (WITHDRAW) @@ -591,48 +549,6 @@ Submit a withdrawal request from the spot account to a Solana address. --- -## Get Withdraw Info (USER_DATA) - -> **Response:** - -```javascript -{ - "userDailyLimit": "10000", - "userRemainingDailyLimit": "9500", - "totalDailyLimit": "100000", - "totalRemainingDailyLimit": "95000", - "balances": { - "USDT": { - "currency": "USDT", - "spotTotalWithdrawAmount": "500", - "perpTotalWithdrawAmount": "0", - "dailyLimit": "5000", - "chainBalances": { - "1": { - "chainId": 1, - "spotMaxWithdrawAmount": "4500", - "perpMaxWithdrawAmount": "1000", - "chainLimit": "5000", - "withdrawFee": "0.5" - } - } - } - } -} -``` - -`GET /aster-chain/v3/spot/user-withdraw-info` - -Query the current user's withdrawal limits and available balances per asset and chain for the spot account. - -**Weight:** 1 - -**Parameters:** - -None - ---- - ## Deposit/Withdraw History (USER_DATA) > **Response:** @@ -698,40 +614,32 @@ Transfer assets between the spot wallet and the perp account. --- -## Transfer History (USER_DATA) +# Aster-Chain Withdraw Endpoints + +## Estimate Withdraw Fee (NONE) > **Response:** ```javascript { - "total": 2, - "rows": [ - { - "asset": "USDT", - "tranId": 123456789, - "amount": "100", - "kindType": "SPOT_FUTURE", // "SPOT_FUTURE" or "FUTURE_SPOT" - "createTime": 1699900800000, - "updateTime": 1699900810000, - "status": "SUCCESS" // "SUCCESS", "FAIL", or "PENDING" - } - ] + "gasPrice": 1000000000, + "gasLimit": 21000, + "nativePrice": "1800.00", + "tokenPrice": "1.00", + "gasCost": "0.000021", + "gasUsdValue": "0.038" } ``` -`GET /aster-chain/v3/spot/transfer/history` +`GET /aster-chain/v3/withdraw/estimateFee` -Query the wallet transfer history between spot and perp for the current user. +Estimate the gas fee for a withdrawal on the specified chain and asset. -**Weight:** 5 +**Weight:** 1 **Parameters:** | Name | Type | Mandatory | Description | |------|------|-----------|-------------| -| asset | STRING | NO | Filter by asset name | -| startTime | LONG | NO | Start time in milliseconds | -| endTime | LONG | NO | End time in milliseconds (defaults to current time) | -| page | INTEGER | NO | Page number, default `1` | -| pageSize | INTEGER | NO | Records per page, default `10`, max `100` | -| order | STRING | NO | Sort order: `"ASC"` or `"DESC"` (default `"DESC"`) | +| chainId | INTEGER | YES | Target chain ID | +| asset | STRING | YES | Asset name (e.g. `"USDT"`) | diff --git "a/V3(Recommended)/\344\270\255\346\226\207/aster-chain_CN.md" "b/V3(Recommended)/\344\270\255\346\226\207/aster-chain_CN.md" index bf1a9a0..2dd9323 100644 --- "a/V3(Recommended)/\344\270\255\346\226\207/aster-chain_CN.md" +++ "b/V3(Recommended)/\344\270\255\346\226\207/aster-chain_CN.md" @@ -23,14 +23,12 @@ - [查询提现信息 (USER_DATA)](#查询提现信息-user_data) - [充提记录 (USER_DATA)](#充提记录-user_data) - [钱包划转 (TRADE)](#钱包划转-trade) - - [划转记录 (USER_DATA)](#划转记录-user_data) - [Aster-Chain 现货提现与划转接口](#aster-chain-现货提现与划转接口) - [现货提现 (WITHDRAW)](#现货提现-withdraw) - [现货 Solana 提现 (WITHDRAW)](#现货-solana-提现-withdraw) - - [查询提现信息 (USER_DATA)](#查询提现信息-user_data-1) - - [充提记录 (USER_DATA)](#充提记录-user_data-1) - [钱包划转 (TRADE)](#钱包划转-trade-1) - - [划转记录 (USER_DATA)](#划转记录-user_data-1) +- [Aster-Chain 提现接口](#aster-chain-提现接口) + - [估算提现手续费 (NONE)](#估算提现手续费-none) --- @@ -487,46 +485,6 @@ --- -## 划转记录 (USER_DATA) - -> **响应:** - -```javascript -{ - "total": 2, - "rows": [ - { - "asset": "USDT", - "tranId": 123456789, - "amount": "100", - "kindType": "SPOT_FUTURE", // "SPOT_FUTURE" 或 "FUTURE_SPOT" - "createTime": 1699900800000, - "updateTime": 1699900810000, - "status": "SUCCESS" // "SUCCESS"、"FAIL" 或 "PENDING" - } - ] -} -``` - -`GET /aster-chain/v3/perp/transfer/history` - -查询当前用户现货与合约间的划转历史记录。 - -**权重:** 5 - -**参数:** - -| 名称 | 类型 | 是否必需 | 描述 | -|------|------|---------|------| -| asset | STRING | NO | 按资产名称过滤 | -| startTime | LONG | NO | 起始时间(毫秒) | -| endTime | LONG | NO | 结束时间(毫秒),默认为当前时间 | -| page | INTEGER | NO | 页码,默认 `1` | -| pageSize | INTEGER | NO | 每页记录数,默认 `10`,最大 `100` | -| order | STRING | NO | 排序方式:`"ASC"` 或 `"DESC"`(默认 `"DESC"`) | - ---- - # Aster-Chain 现货提现与划转接口 ## 现货提现 (WITHDRAW) @@ -591,82 +549,6 @@ --- -## 查询提现信息 (USER_DATA) - -> **响应:** - -```javascript -{ - "userDailyLimit": "10000", - "userRemainingDailyLimit": "9500", - "totalDailyLimit": "100000", - "totalRemainingDailyLimit": "95000", - "balances": { - "USDT": { - "currency": "USDT", - "spotTotalWithdrawAmount": "500", - "perpTotalWithdrawAmount": "0", - "dailyLimit": "5000", - "chainBalances": { - "1": { - "chainId": 1, - "spotMaxWithdrawAmount": "4500", - "perpMaxWithdrawAmount": "1000", - "chainLimit": "5000", - "withdrawFee": "0.5" - } - } - } - } -} -``` - -`GET /aster-chain/v3/spot/user-withdraw-info` - -查询当前用户现货账户各资产、各链的提现限额及可用余额。 - -**权重:** 1 - -**参数:** - -无 - ---- - -## 充提记录 (USER_DATA) - -> **响应:** - -```javascript -[ - { - "id": "12345", - "type": "WITHDRAW", // "DEPOSIT" 或 "WITHDRAW" - "asset": "USDT", - "amount": "100", - "state": "COMPLETED", - "txHash": "0xabc123...", - "time": 1699900800000, - "chainId": 1, - "accountType": "spot" - } -] -``` - -`GET /aster-chain/v3/spot/deposit-withdraw-history` - -查询当前用户现货账户的充值与提现历史记录。 - -**权重:** 5 - -**参数:** - -| 名称 | 类型 | 是否必需 | 描述 | -|------|------|---------|------| -| chainId | STRING | NO | 按链 ID 过滤记录 | - ---- - ## 钱包划转 (TRADE) > **响应:** @@ -698,40 +580,32 @@ --- -## 划转记录 (USER_DATA) +# Aster-Chain 提现接口 + +## 估算提现手续费 (NONE) > **响应:** ```javascript { - "total": 2, - "rows": [ - { - "asset": "USDT", - "tranId": 123456789, - "amount": "100", - "kindType": "SPOT_FUTURE", // "SPOT_FUTURE" 或 "FUTURE_SPOT" - "createTime": 1699900800000, - "updateTime": 1699900810000, - "status": "SUCCESS" // "SUCCESS"、"FAIL" 或 "PENDING" - } - ] + "gasPrice": 1000000000, + "gasLimit": 21000, + "nativePrice": "1800.00", + "tokenPrice": "1.00", + "gasCost": "0.000021", + "gasUsdValue": "0.038" } ``` -`GET /aster-chain/v3/spot/transfer/history` +`GET /aster-chain/v3/withdraw/estimateFee` -查询当前用户现货与合约间的划转历史记录。 +估算指定链和资产的提现 Gas 手续费。 -**权重:** 5 +**权重:** 1 **参数:** | 名称 | 类型 | 是否必需 | 描述 | |------|------|---------|------| -| asset | STRING | NO | 按资产名称过滤 | -| startTime | LONG | NO | 起始时间(毫秒) | -| endTime | LONG | NO | 结束时间(毫秒),默认为当前时间 | -| page | INTEGER | NO | 页码,默认 `1` | -| pageSize | INTEGER | NO | 每页记录数,默认 `10`,最大 `100` | -| order | STRING | NO | 排序方式:`"ASC"` 或 `"DESC"`(默认 `"DESC"`) | +| chainId | INTEGER | YES | 目标链 ID | +| asset | STRING | YES | 资产名称(如 `"USDT"`) | From a836e0261bfac793d29584020fb3bda7d5291c86 Mon Sep 17 00:00:00 2001 From: "ivan.z-apx" Date: Thu, 28 May 2026 16:55:48 +0800 Subject: [PATCH 3/3] remove spot deposit/withdraw history section Co-Authored-By: Claude Sonnet 4.6 --- V3(Recommended)/EN/aster-chain.md | 33 ------------------------------- 1 file changed, 33 deletions(-) diff --git a/V3(Recommended)/EN/aster-chain.md b/V3(Recommended)/EN/aster-chain.md index 763a763..e674bb5 100644 --- a/V3(Recommended)/EN/aster-chain.md +++ b/V3(Recommended)/EN/aster-chain.md @@ -549,39 +549,6 @@ Submit a withdrawal request from the spot account to a Solana address. --- -## Deposit/Withdraw History (USER_DATA) - -> **Response:** - -```javascript -[ - { - "id": "12345", - "type": "WITHDRAW", // "DEPOSIT" or "WITHDRAW" - "asset": "USDT", - "amount": "100", - "state": "COMPLETED", - "txHash": "0xabc123...", - "time": 1699900800000, - "chainId": 1, - "accountType": "spot" - } -] -``` - -`GET /aster-chain/v3/spot/deposit-withdraw-history` - -Query the deposit and withdrawal history for the current user's spot account. - -**Weight:** 5 - -**Parameters:** - -| Name | Type | Mandatory | Description | -|------|------|-----------|-------------| -| chainId | STRING | NO | Filter records by chain ID | - ---- ## Wallet Transfer (TRADE)