For the complete documentation index, see llms.txt. This page is also available as Markdown.

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/calldata
Field
Type
Required
Description

userAddress

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/send
Field
Type
Required
Description

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 Deposit Tx

POST /api/v1/stock/deposits/tx
Field
Type
Required
Description

txHash

string

Yes

Stock deposit tx hash.

Query Stock Deposits

Build Stock Withdrawal Calldata

Field
Type
Required
Description

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

Field
Type
Required
Description

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

Field
Type
Required
Description

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