Trading
POST /v1/order
Place a signed limit or market order. The API verifies the signature and relays the transaction on-chain.
curl -X POST https://rpc.vordium.com/v1/order \
-H "Content-Type: application/json" \
-d '{
"symbol": "ETH",
"side": "buy",
"type": "limit",
"price": "2000.0",
"amount": "0.1",
"network": "testnet",
"trader": "0xYourAddress",
"signature": "0xSignedMessage",
"nonce": 1712678400
}'Signature: Sign keccak256(abi.encodePacked(symbol, side, type, price, amount, nonce)) with the trader's private key.
{
"data": { "orderId": "123", "symbol": "ETH", "side": "buy", "price": "2000.0", "amount": "0.1", "status": "open", "txHash": "0x..." }
}POST /v1/order/batch
Place up to 10 orders in a single request. All orders are submitted sequentially on-chain.
curl -X POST https://rpc.vordium.com/v1/order/batch \
-H "Content-Type: application/json" \
-d '{
"orders": [
{ "symbol": "ETH", "side": "buy", "price": "2000", "amount": "0.1" },
{ "symbol": "BTC", "side": "sell", "price": "72000", "amount": "0.01" }
],
"trader": "0xYourAddress",
"signature": "0xSignedMessage",
"nonce": 1712678400,
"network": "testnet"
}'Signature: Sign keccak256(abi.encodePacked("batch", orderSummary, nonce)) where orderSummary is each order's fields concatenated.
DELETE /v1/order/:orderId
Cancel a specific order by ID. Verifies the signature and that the order belongs to the trader.
curl -X DELETE https://rpc.vordium.com/v1/order/42 \
-H "Content-Type: application/json" \
-d '{
"trader": "0xYourAddress",
"signature": "0xSignedMessage",
"nonce": 1712678400,
"network": "testnet"
}'Signature: Sign keccak256(abi.encodePacked("cancel", orderId, nonce)).
DELETE /v1/order/cancel-all
Cancel all open orders for a trader. Finds open/partial orders and cancels each on-chain.
curl -X DELETE https://rpc.vordium.com/v1/order/cancel-all \
-H "Content-Type: application/json" \
-d '{
"trader": "0xYourAddress",
"signature": "0xSignedMessage",
"nonce": 1712678400,
"network": "testnet"
}'Signature: Sign keccak256(abi.encodePacked("cancel-all", nonce)).
{
"data": { "trader": "0x...", "totalOrders": 15, "openOrders": 3, "cancelled": 3, "cancelledIds": ["10", "12", "14"] }
}