Skip to main content
POST
/
order
/
market
Create a market order
curl --request POST \
  --url https://api.example.com/order/market \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "destinationAddress": "<string>",
  "refundAddress": "<string>",
  "senderAddress": "<string>",
  "integratorName": "<string>",
  "approvalMode": "<string>"
}
'
{
  "orderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "quote": {
    "mode": "<string>",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "fees": {
      "totalUsd": 123,
      "preswap": {
        "amount": "<string>",
        "currency": {
          "chain": {
            "kind": "<string>"
          },
          "token": {
            "kind": "<string>",
            "decimals": 1
          }
        },
        "usd": 123
      },
      "rift": {
        "network": {
          "amount": "<string>",
          "currency": {
            "chain": {
              "kind": "<string>"
            },
            "token": {
              "kind": "<string>",
              "decimals": 1
            }
          },
          "usd": 123
        },
        "liquidity": {
          "amount": "<string>",
          "currency": {
            "chain": {
              "kind": "<string>"
            },
            "token": {
              "kind": "<string>",
              "decimals": 1
            }
          },
          "usd": 123
        },
        "protocol": {
          "amount": "<string>",
          "currency": {
            "chain": {
              "kind": "<string>"
            },
            "token": {
              "kind": "<string>",
              "decimals": 1
            }
          },
          "usd": 123
        }
      },
      "postswap": {
        "amount": "<string>",
        "currency": {
          "chain": {
            "kind": "<string>"
          },
          "token": {
            "kind": "<string>",
            "decimals": 1
          }
        },
        "usd": 123
      }
    },
    "expiresAt": "2023-11-07T05:31:56Z",
    "from": {
      "currency": {
        "chain": {
          "kind": "<string>"
        },
        "token": {
          "kind": "<string>",
          "decimals": 1
        }
      },
      "expected": "<string>"
    },
    "to": {
      "currency": {
        "chain": {
          "kind": "<string>"
        },
        "token": {
          "kind": "<string>",
          "decimals": 1
        }
      },
      "expected": "<string>",
      "minimum": "<string>"
    }
  },
  "executionSteps": [
    {
      "id": "<string>",
      "action": "<string>",
      "kind": "<string>",
      "chainId": 123,
      "to": "<string>",
      "calldata": "<string>",
      "value": "<string>",
      "tokenAddress": "<string>",
      "spenderAddress": "<string>",
      "amount": "<string>",
      "venue": "<string>"
    }
  ]
}

Body

application/json

Request to execute a market swap

id
string<uuid>
required

Quote ID from /quote endpoint

destinationAddress
string
required

Address to receive output funds

refundAddress
string
required

Address for refund if swap fails

senderAddress
string

EVM sender address used to build EVM execution steps (approvals / DEX swaps). Required only for routes with EVM execution steps.

integratorName
string

Integrator name for attribution/analytics

approvalMode

Approval amount strategy for ERC20 swaps. "full" (default) uses max uint256; "partial" approves only the sell amount.

Allowed value: "full"

Response

Swap created

Swap response with execution steps

orderId
string<uuid>
required

The public order ID

quote
object
required

Quote response with pricing and fees

executionSteps
(EvmCallStep · object | Eip712SignStep · object | BtcTransferStep · object)[]
required

Steps client must execute to complete the swap

Execution step for client to perform