Skip to main content
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

ExchangeEndpointDescription
AsterPOST /api/trading/aster/depositDeposits USDT on BNB Chain into the Aster exchange
HyperliquidPOST /api/trading/hyperliquid/depositTransfers USDC on Arbitrum directly to Hyperliquid

Prerequisites

Before depositing, ensure your server wallet has:
  1. Trading tokens (USDT, USDC) - The asset you want to deposit
  2. 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

FieldTypeRequiredDescription
walletIdOrAddressstringYesCan be userId, walletId, or wallet address
tokenSymbolstringYesToken to deposit (e.g., “USDT”, “USDC”)
amountstringYesAmount in token units (e.g., “100” = 100 USDT)
brokernumberNoBroker ID (default: 1000)
networkstringYesNetwork name (“ethereum”, “arbitrum”, “bnb”)

What Happens

  1. Balance Check - Verifies server wallet has sufficient tokens and gas
  2. Token Approval (if needed) - Signs and broadcasts ERC20 approve transaction
  3. Deposit Transaction - Signs and broadcasts deposit to Aster contract
  4. 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

FieldTypeRequiredDescription
walletIdOrAddressstringYesCan be userId, walletId, or wallet address
tokenSymbolstringYesToken to deposit (e.g., “USDC”)
amountstringYesAmount in token units
networkKeystringYesNetwork 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

FieldTypeRequiredDescription
walletIdstringYes*Wallet ID (UUID)
addressstringYes*Wallet address (if walletId not provided)
amountstringYesAmount to transfer
assetstringYesAsset symbol (e.g., “USDT”)
clientTranIdstringYesUnique client transfer ID for idempotency
kindTypestringYesTransfer 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

ExchangeNetworkTokenDecimalsNotes
AsterBNB Chain (BSC)USDT18Automatic approval handling
HyperliquidArbitrumUSDC6Direct 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.