Post Orders
AuthorizationBearer <token>Scope: orders:write
Idempotency-Key*stringUnique key making the create idempotent (16-64 chars of A-Z a-z 0-9 _ -).
^[a-zA-Z0-9_-]{16,64}$application/json- body
Create an order. The order type is derived server-side from source_origin/target_destination: omit source_origin for a deposit, omit target_destination for a withdrawal, point both at the same subaccount for an exchange, or at two subaccounts for a transfer. Provide exactly one of source_amount/target_amount, and at least one of source_origin/target_destination.
source_origin?stringSubaccount/account ID funds move from (prefix sub_/acc_). Omit for a deposit.
target_destination?stringSubaccount/account ID funds move to. Omit for a withdrawal.
source_asset*stringAsset code debited, e.g. USD, USDC, BRL.
target_asset*stringAsset code credited.
source_amount?stringDecimal string. Provide this OR target_amount (not both).
target_amount?stringDecimal string. Provide this OR source_amount (not both).
network?stringChain for a crypto withdrawal (required when withdrawing to a wallet), e.g. ethereum, tron.
wallet_id?stringDestination wallet (prefix wal_) for a crypto withdrawal.
bank_account_id?stringDestination bank account (prefix ba_) for a fiat withdrawal.
description?stringexternal_reference?stringYour own reference, echoed back on the order.
Idempotent replay: the Idempotency-Key matched an existing order, returned unchanged.
application/json- response
id*stringOrder ID (prefix ord_).
type*stringDerived order type.
"deposit""withdrawal""exchange""transfer""pool_deposit""pool_withdrawal""pool_exchange"status*string"pending""processing""completed""canceled"source_origin?stringtarget_destination?stringsource_origin_details?Snapshot of the origin/destination wallet or bank account (set by order type).
target_destination_details?Snapshot of the origin/destination wallet or bank account (set by order type).
source_asset*stringtarget_asset*stringsource_amount*stringDecimal string.
target_amount*stringDecimal string.
fee*stringDecimal string.
price_reference?stringDecimal string; FX orders only.
rate_base_asset?stringBase asset for price_reference; FX orders only.
failure_code?stringSet when status is canceled due to failure.
external_reference?stringdescription?stringcreated_at*stringdate-timecompleted_at?stringdate-timecurl -X POST 'https://api.betaramps.com/orders' \ -H 'Idempotency-Key: string' \ -H 'Content-Type: application/json' \ -d '{ "source_origin": "sub_0192f4e3-8a9b-7c6d-5e4f-3a2b1c0d9e8f", "source_asset": "USDC", "target_asset": "USDC", "source_amount": "100", "wallet_id": "wal_0192f4e6-1a2b-7c3d-8e4f-5a6b7c8d9e01", "network": "ethereum", "external_reference": "payout-1001"}'{ "id": "ord_0192f4e3-8a9b-7c6d-5e4f-3a2b1c0d9e8f", "type": "withdrawal", "status": "completed", "source_origin": "sub_0192f4e3-8a9b-7c6d-5e4f-3a2b1c0d9e8f", "target_destination_details": { "wallet_id": "wal_0192f4e6-1a2b-7c3d-8e4f-5a6b7c8d9e01", "wallet_address": "0xabc1230000000000000000000000000000000000", "network": "ethereum", "asset": "USDC" }, "source_asset": "USDC", "target_asset": "USDC", "source_amount": "100", "target_amount": "97.5", "fee": "2.5", "external_reference": "payout-1001", "created_at": "2026-01-15T10:00:00Z", "completed_at": "2026-01-15T10:05:00Z"}