Deposit funds from your server wallet to exchange accounts. The server handles transaction signing and broadcasting using MPC-secured wallets.
Minimum Deposit: All deposits must meet the minimum amount enforced by MINIMUM_DEPOSIT_AMOUNT. Requests below this value return a 400 error.
Endpoints
| Exchange | Endpoint | Description |
|---|
| Aster | POST /api/trading/aster/deposit | Deposits USDT on BNB Chain into the Aster exchange |
| Hyperliquid | POST /api/trading/hyperliquid/deposit | Transfers USDC on Arbitrum directly to Hyperliquid |
Prerequisites
Before depositing, ensure your server wallet has:
- Trading tokens (USDT, USDC) - The asset you want to deposit
- Gas tokens (BNB, ETH) - Native currency for transaction fees
Aster Deposit
Deposits USDT on BNB Chain to the Aster exchange. The server automatically handles token approval and deposit transactions.
Endpoint
POST /api/trading/aster/deposit
Request Body
{
"walletIdOrAddress": "user_123",
"tokenSymbol": "USDT",
"amount": "100",
"broker": 1000,
"network": "bnb"
}
Request Parameters
| Field | Type | Required | Description |
|---|
walletIdOrAddress | string | Yes | Can be userId, walletId, or wallet address |
tokenSymbol | string | Yes | Token to deposit (e.g., “USDT”, “USDC”) |
amount | string | Yes | Amount in token units (e.g., “100” = 100 USDT) |
broker | number | No | Broker ID (default: 1000) |
network | string | Yes | Network name (“ethereum”, “arbitrum”, “bnb”) |
What Happens
- Balance Check - Verifies server wallet has sufficient tokens and gas
- Token Approval (if needed) - Signs and broadcasts ERC20 approve transaction
- Deposit Transaction - Signs and broadcasts deposit to Aster contract
- Confirmation - Waits for blockchain confirmation
Example Request
curl -X POST https://api.dexaggregatorbeta.xyz/api/trading/aster/deposit \
-H "Content-Type: application/json" \
-d '{
"walletIdOrAddress": "user_123",
"tokenSymbol": "USDT",
"amount": "100",
"network": "bnb"
}'
await axios.post('https://api.dexaggregatorbeta.xyz/api/trading/aster/deposit', {
walletIdOrAddress: 'user_123',
tokenSymbol: 'USDT',
amount: '100',
network: 'bnb'
});
Success Response
{
"success": true,
"data": {
"txHash": "0x1234abcd...",
"txUrl": "https://bscscan.com/tx/0x1234abcd...",
"amount": "100",
"token": "USDT",
"network": "bsc",
"decimals": 6,
"blockNumber": "12345678"
}
}
Status Codes
200 – Deposit completed successfully
400 – Missing required parameters or amount below minimum
500 – Server error during deposit process
Hyperliquid Deposit
Transfers USDC on Arbitrum directly to Hyperliquid. The server handles transaction signing and broadcasting.
Endpoint
POST /api/trading/hyperliquid/deposit
Request Body
{
"walletIdOrAddress": "0x90EA34C09B612AC68E696BdC7be0ED037a086E72",
"tokenSymbol": "USDC",
"amount": "5",
"networkKey": "arbitrum"
}
Request Parameters
| Field | Type | Required | Description |
|---|
walletIdOrAddress | string | Yes | Can be userId, walletId, or wallet address |
tokenSymbol | string | Yes | Token to deposit (e.g., “USDC”) |
amount | string | Yes | Amount in token units |
networkKey | string | Yes | Network key (“arbitrum”) |
Example Request
curl -X POST https://api.dexaggregatorbeta.xyz/api/trading/hyperliquid/deposit \
-H "Content-Type: application/json" \
-d '{
"walletIdOrAddress": "0x90EA34C09B612AC68E696BdC7be0ED037a086E72",
"tokenSymbol": "USDC",
"amount": "5",
"networkKey": "arbitrum"
}'
Success Response
{
"success": true,
"data": {
"transactionId": "0x...ab4839df29",
"status": "submitted",
"timestamp": 1698840000000
}
}
Status Codes
200 – Transfer completed successfully
400 – Invalid payload or amount below minimum
500 – Broadcast failure
Transfer Between Spot and Perp Accounts (Aster Only)
Move funds internally between Spot and Futures (Perp) wallets within Aster exchange.
Endpoint
POST /api/aster/wallet/transfer
Request Body
{
"walletId": "29dd4dc0-1ff9-4df6-a19f-936f997cbc5a",
"amount": "50",
"asset": "USDT",
"clientTranId": "transfer_001",
"kindType": "SPOT_FUTURE"
}
Request Parameters
| Field | Type | Required | Description |
|---|
walletId | string | Yes* | Wallet ID (UUID) |
address | string | Yes* | Wallet address (if walletId not provided) |
amount | string | Yes | Amount to transfer |
asset | string | Yes | Asset symbol (e.g., “USDT”) |
clientTranId | string | Yes | Unique client transfer ID for idempotency |
kindType | string | Yes | Transfer direction |
*Either walletId or address is required
Transfer Directions
SPOT_FUTURE - Transfer from Spot → Futures
FUTURE_SPOT - Transfer from Futures → Spot
Example Request
curl -X POST https://api.dexaggregatorbeta.xyz/api/aster/wallet/transfer \
-H "Content-Type: application/json" \
-d '{
"walletId": "29dd4dc0-1ff9-4df6-a19f-936f997cbc5a",
"amount": "50",
"asset": "USDT",
"clientTranId": "transfer_001",
"kindType": "SPOT_FUTURE"
}'
Success Response
{
"success": true,
"data": {
"transferId": "transfer_001",
"amount": "50",
"asset": "USDT",
"direction": "SPOT_FUTURE",
"status": "completed"
}
}
Common Error Responses
400 Bad Request - Missing Parameters
{
"error": "Missing required parameters"
}
400 Bad Request - Below Minimum
{
"error": "Amount below minimum deposit requirement"
}
400 Unsupported Exchange
{
"success": false,
"error": "Deposit for exchange 'unknown' is not supported",
"timestamp": 1700000000000
}
500 Internal Server Error
{
"success": false,
"error": "Failed to deposit funds",
"timestamp": 1700000000000
}
Supported Networks & Tokens
| Exchange | Network | Token | Decimals | Notes |
|---|
| Aster | BNB Chain (BSC) | USDT | 18 | Automatic approval handling |
| Hyperliquid | Arbitrum | USDC | 6 | Direct transfer to exchange |
Important Notes
Server-Side Signing: All transactions are signed server-side using MPC-secured wallets. Never expose wallet credentials to clients.
Automatic Approval: The server automatically handles token approvals when needed. You don’t need to manage allowances separately.
Transaction Tracking: Use the returned txHash and txUrl to track deposit progress on block explorers.
Broker ID: For Aster deposits, the broker ID defaults to 1000 if not specified.