POST
/
orders
Create order
curl --request POST \
  --url http://localhost:4433/orders \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_id": "user_123",
  "quote_id": "550e8400-e29b-41d4-a716-446655440000",
  "source": {
    "asset": "avalanche_testnet:usdc",
    "recipient": "0x1234567890abcdef1234567890abcdef12345678",
    "amount": "1000000"
  },
  "destination": {
    "asset": "echo_testnet:usdc",
    "recipient": "0xabcdefabcdefabcdefabcdefabcdefabcdefabcd",
    "amount": "995000"
  },
  "commitment_hash": "0xaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccddaabbccdd"
}
'
{
  "status": "Success",
  "result": {
    "order_id": "<string>",
    "user_id": "<string>",
    "quote_id": "<string>",
    "source_token_price": "<string>",
    "dest_token_price": "<string>",
    "fee_bips": 123,
    "source_intent": {
      "swap_id": "<string>",
      "chain": "<string>",
      "asset": "<string>",
      "token_address": "<string>",
      "creator": "<string>",
      "recipient": "<string>",
      "amount": "<string>",
      "commitment_hash": "<string>",
      "commitment": "<string>",
      "cancel_after": 123,
      "registry_address": "<string>",
      "create_tx_hash": "<string>",
      "create_block_number": 123,
      "create_timestamp": "2023-11-07T05:31:56Z",
      "claim_tx_hash": "<string>",
      "claim_block_number": 123,
      "claim_timestamp": "2023-11-07T05:31:56Z",
      "cancel_tx_hash": "<string>",
      "cancel_block_number": 123,
      "cancel_timestamp": "2023-11-07T05:31:56Z",
      "l1_hop": true,
      "hop_bridge_factory": "<string>",
      "hop_dest_blockchain_id": "<string>",
      "hop_recipient": "<string>",
      "hop_fee_token": "<string>",
      "hop_relayer_fee": "<string>",
      "final_chain": "<string>",
      "final_token_address": "<string>",
      "bridge_tx_hash": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    },
    "destination_intent": {
      "swap_id": "<string>",
      "chain": "<string>",
      "asset": "<string>",
      "token_address": "<string>",
      "creator": "<string>",
      "recipient": "<string>",
      "amount": "<string>",
      "commitment_hash": "<string>",
      "commitment": "<string>",
      "cancel_after": 123,
      "registry_address": "<string>",
      "create_tx_hash": "<string>",
      "create_block_number": 123,
      "create_timestamp": "2023-11-07T05:31:56Z",
      "claim_tx_hash": "<string>",
      "claim_block_number": 123,
      "claim_timestamp": "2023-11-07T05:31:56Z",
      "cancel_tx_hash": "<string>",
      "cancel_block_number": 123,
      "cancel_timestamp": "2023-11-07T05:31:56Z",
      "l1_hop": true,
      "hop_bridge_factory": "<string>",
      "hop_dest_blockchain_id": "<string>",
      "hop_recipient": "<string>",
      "hop_fee_token": "<string>",
      "hop_relayer_fee": "<string>",
      "final_chain": "<string>",
      "final_token_address": "<string>",
      "bridge_tx_hash": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    },
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Body

application/json
user_id
string
required
quote_id
string
required

Quote ID consumed by the orderbook.

source
object
required
destination
object
required
commitment_hash
string
required

Hex-encoded 32-byte SHA-256 commitment hash.

Response

Order created.

status
enum<string>
Available options:
Success
result
object