Skip to main content
POST
/
api
/
v0
/
orders
Create an order from a quote
curl --request POST \
  --url https://api.brl.xyz/api/v0/orders \
  --header 'Content-Type: application/json' \
  --data '
{
  "quote-id": "550e8400-e29b-41d4-a716-446655440000",
  "source-wallet-address": "0x742d35Cc6635C0532925a3b8D295FD6C6e7e2c2c",
  "target-wallet-address": "0x742d35Cc6635C0532925a3b8D295FD6C6e7e2c2c"
}
'
{
  "order": {
    "base-rate": "1.0000",
    "state-updated-at": "2024-01-15T10:30:00Z",
    "effective-rate": "0.9950",
    "state": "created",
    "target-asset": "eth-base/brlv",
    "id": "660e8400-e29b-41d4-a716-446655440001",
    "quote-id": "550e8400-e29b-41d4-a716-446655440000",
    "source-asset": "fiat/brl",
    "source-amount": "100.50",
    "created-at": "2024-01-15T10:30:00Z",
    "target-amount": "99.75"
  }
}

Body

application/json
quote-id
string<uuid>
required

Unique identifier of the quote to accept

Example:

"550e8400-e29b-41d4-a716-446655440000"

source-wallet-address
string | null

Ethereum wallet address for source tokens (required only when source asset is a token like eth-base/brlv or eth-base/wbrly)

Example:

"0x742d35Cc6635C0532925a3b8D295FD6C6e7e2c2c"

target-wallet-address
string | null

Ethereum wallet address for receiving tokens (required only when target asset is a token like eth-base/brlv or eth-base/wbrly)

Example:

"0x742d35Cc6635C0532925a3b8D295FD6C6e7e2c2c"

Response

Order created successfully

order
object
required