Deposits & Withdrawals
Stock endpoints move ERC-20 stock tokens between wallet balance and Stock.stockBalance. The API surfaces Stock.stockBalance as exchangeBalance.
Cash endpoints are separate. Use /cash/** only for cash-token flows into or out of Cashier.
Build Stock Deposit Calldata
POST /api/v1/stock/deposits/calldatauserAddress
string
Yes
User wallet.
tokenAddress
string
Yes
Stock token contract address.
tokenAmount
string / number
Yes
Human-readable stock token amount.
The user wallet must approve StockRouter for the stock token before the transaction can move wallet stock into Stock.
One Click Stock Deposit
POST /api/v1/stock/deposits/sendtokenAddress
string
Yes
Stock token contract address.
tokenAmount
string / number
Yes
Human-readable stock token amount.
gasLimit
number
No
Optional gas limit.
Uses API key bound userAddress; do not include userAddress in the request body.
Record Stock Deposit Tx
POST /api/v1/stock/deposits/txtxHash
string
Yes
Stock deposit tx hash.
Query Stock Deposits
Build Stock Withdrawal Calldata
userAddress
string
Yes
User wallet.
tokenAddress
string
Yes
Stock token contract address.
tokenAmount
string / number
Yes
Human-readable stock token amount.
Withdrawals deduct Stock.stockBalance and transfer ERC-20 stock tokens to the wallet.
One Click Stock Withdrawal
tokenAddress
string
Yes
Stock token contract address.
tokenAmount
string / number
Yes
Human-readable stock token amount.
gasLimit
number
No
Optional gas limit.
Uses API key bound userAddress; do not include userAddress in the request body.
Record Stock Withdrawal Tx
txHash
string
Yes
Stock withdrawal tx hash.
Query Stock Withdrawals
operationId is an API/indexer identifier for looking up the recorded stock operation. The Stock contract emits deposit and withdrawal events, but those events do not include a contract-native operationId.
Last updated

