Submit a withdrawal
Verifies the user's EIP-712 `WithdrawBalance(address signer,uint256 amount,uint128 nonce,uint256 fee)` signature against the configured ScalarProtocol domain before forwarding. The domain uses name `ScalarProtocol`, version `1`, the configured chain ID, and configured protocol address. Rejections include `insufficient_balance` and `duplicate_request`. In-memory duplicate tracking does not provide durable replay protection across service restarts.
Verifies the user's EIP-712 WithdrawBalance(address signer,uint256 amount,uint128 nonce,uint256 fee)
signature against the configured ScalarProtocol domain before forwarding.
The domain uses name ScalarProtocol, version 1, the configured chain ID,
and configured protocol address. Rejections include insufficient_balance
and duplicate_request. In-memory duplicate tracking does not provide durable
replay protection across service restarts.
application/json- body
amount*stringWithdrawal amount encoded as a base-10 string and required to be greater than zero
fee*stringWithdrawal fee encoded as a base-10 string and required to be less than amount
nonce*stringWithdrawal nonce encoded as a base-10 uint128 string
signature*stringEIP-712 signature as 65-byte r,s,v (v 27/28) or 64-byte EIP-2098 hex
user*stringUser address in hex format (0x prefix optional)
Withdrawal accepted immediately; balance updated
application/json- response
The venue accepted a withdrawal. Rejections come back as an error envelope
with insufficient_balance or duplicate_request, so there is exactly one
status vocabulary rather than a status string beside an HTTP code.
balance*stringPost-validation balance, micro-dollars (base-10 string)
nonce*stringAccepted withdrawal nonce encoded as a base-10 string
user*stringUser address as 0x-prefixed lowercase hex
curl -X POST 'https://testnet-api.scalar.market/withdrawals' \
-H 'Content-Type: application/json' \
-d '{
"amount": "string",
"fee": "string",
"nonce": "string",
"signature": "string",
"user": "string"
}'{
"balance": "string",
"nonce": "string",
"user": "string"
}Submit an order POST
Creates an order in the matching engine after validating the user, client tag, instrument, price range, and request signature. `valid_till` must be at least 150 seconds in the future; the order is then matchable for `valid_till - now - valid_till_buffer`. `position_limit_exceeded` means the order would exceed the signed 64-bit outstanding size or effective position for this user and instrument. The nonce remains available for retry after exposure changes.
Get account statistics GET
Returns aggregate account statistics: join date, activity, position, trade, settlement and instrument counts, net profit and total volume.