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

API ↔ Contract Map

This page maps partner API endpoints to the contract-level effect they prepare, submit, or query. Use it when debugging or explaining why an API call changes mUSD, Stock.stockBalance, or order state.

Overview

Market and Portfolio

Endpoint
Contract relationship
Effect

GET /api/v1/config

Reads on-chain Cashier/Exchange config cache

Returns fee rates, buffer state, and per-token cashier limits; no state change

GET /api/v1/symbols

Reads backend/token registry

Lists tradable stock tokens and contract addresses

GET /api/v1/prices/{symbol}

Off-chain quote plus on-chain token context

Quote display; no state change

GET /api/v1/prices/{symbol}/history

Market data

Historical display; no state change

GET /api/v1/underlying/{symbol}/price

Market data

Underlying quote; no state change

GET /api/v1/corporate-action

Corporate action data

Split/dividend data; no state change

GET /api/v1/users/{userId}/balance

Cashier + token balances + allowance

Portfolio, buy power, deposit readiness

GET /api/v1/users/{userId}/positions

Indexed Stock state

Stock positions

Orders

Endpoint
Contract relationship
Effect

POST /api/v1/orders/calldata

Encodes StockRouter.placeMarketOrder or placeLimitOrder

Returns tx data; no state change until submitted

POST /api/v1/orders/send

OneClickRouter forwards to StockRouter

Places order and auto-records tx

POST /api/v1/orders/with-deposit/calldata

Encodes StockRouter.depositAndMarketBuy, depositAndLimitBuy, depositStockAndMarketSell, or depositStockAndLimitSell

Returns tx data for combined deposit + order

POST /api/v1/orders/with-deposit/send

OneClickRouter forwards combined deposit + order

Submits combined flow and auto-records tx

POST /api/v1/orders/tx

API/indexer mapping

Links self-submitted tx to API key

GET /api/v1/orders

API order mapping / indexed state

Lists mapped orders

GET /api/v1/orders/tx/{txHash}

API tx mapping

Finds order by tx

GET /api/v1/orders/{orderId}

Indexed Stock state

Shows open or historical order

DELETE /api/v1/orders/{orderId}/calldata

Encodes StockRouter.cancelLimitOrder

Returns cancel tx data

DELETE /api/v1/orders/{orderId}/send

OneClickRouter forwards cancel

Cancels via delegated execution

Cash

Endpoint
Contract relationship
Effect

POST /api/v1/cash/deposits/calldata

Encodes StockRouter.deposit

Returns deposit tx data

POST /api/v1/cash/deposits/send

OneClickRouter forwards deposit

Deposits from bound user

POST /api/v1/cash/deposits/tx

API/indexer mapping

Links self-submitted deposit tx

GET /api/v1/cash/deposits

Indexed Cashier state

Lists deposits

GET /api/v1/cash/deposits/{operationId}

Cash operation state

Deposit detail and status

POST /api/v1/cash/withdrawals/calldata

Encodes StockRouter.withdraw

Returns withdrawal tx data

POST /api/v1/cash/withdrawals/send

OneClickRouter forwards withdrawal

Withdraws from bound user

POST /api/v1/cash/withdrawals/tx

API/indexer mapping

Links self-submitted withdrawal tx

GET /api/v1/cash/withdrawals

Indexed Cashier state

Lists withdrawals

GET /api/v1/cash/withdrawals/{operationId}

Cash operation state

Withdrawal detail and status

Stock

Endpoint
Contract relationship
Effect

POST /api/v1/stock/deposits/calldata

Encodes StockRouter.depositStock

Returns stock deposit tx data

POST /api/v1/stock/deposits/send

OneClickRouter forwards stock deposit

Deposits stock from bound user

POST /api/v1/stock/deposits/tx

API/indexer mapping

Links self-submitted stock deposit tx

GET /api/v1/stock/deposits

Indexed Stock state

Lists stock deposits

GET /api/v1/stock/deposits/{operationId}

Stock operation state

Stock deposit detail

POST /api/v1/stock/withdrawals/calldata

Encodes StockRouter.withdrawStock

Returns stock withdrawal tx data

POST /api/v1/stock/withdrawals/send

OneClickRouter forwards stock withdrawal

Withdraws stock from bound user

POST /api/v1/stock/withdrawals/tx

API/indexer mapping

Links self-submitted stock withdrawal tx

GET /api/v1/stock/withdrawals

Indexed Stock state

Lists stock withdrawals

GET /api/v1/stock/withdrawals/{operationId}

Stock operation state

Stock withdrawal detail

For stock deposit and withdrawal detail endpoints, operationId is an API/indexer lookup identifier. It is not emitted as a native field by Stock.depositStock or Stock.withdrawStock events.

One Click

Endpoint
Contract relationship
Effect

GET /api/v1/1ct/status

Reads OneClickRouter delegate state

Shows delegation state

POST /api/v1/1ct/prepare

Builds EIP-712 delegate payload

No state change

POST /api/v1/1ct/enable

Calls delegateBySig through operator

Enables delegatee

POST /api/v1/1ct/disable

Calls undelegate flow

Disables delegation

Invariants for Integrators

  • API calldata targets StockRouter; do not call Cashier or Stock directly.

  • Buy orders lock mUSD in Cashier.

  • Plain sell orders lock Stock.stockBalance, surfaced by the API as exchangeBalance.

  • Order settlement updates mUSD and exchangeBalance asynchronously after execution.

  • Cash operations can be instant or queued depending on Cashier buffers.

Last updated