---
title: "Create a new gateway order."
method: POST
path: "/v2/create-order"
tags: ["v2"]
---

# Create a new gateway order.

`POST /v2/create-order`

Creates a new request, reserves the required liquidity.

## Request body

- union — Gateway quote.
  - object
    - `onramp` GatewayOnrampQuoteV2, required — V2 onramp quote: identical to V1 plus a resolved `affiliates` list. Kept as a separate type so the V1 OpenAPI schema stays frozen.
      - `affiliateAddress` string, nullable — Affiliate address (V1-compatible field; first entry from `affiliates`).
      - `affiliates` ResolvedAffiliate[] — Resolved affiliate recipients and computed fees.
        - `address` string, required — Affiliate recipient address.
        - `fee` GatewayTokenAmountV2, required
          - `address` string, required
          - `amount` string, required
          - `chain` string, required
          - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `dstChain` string, required — Destination chain
      - `dstToken` string, required — Destination token address
      - `estimatedTimeInSecs` integer, nullable — Estimated time in secs to complete the Order
      - `executionFees` GatewayTokenAmountV2, required
        - `address` string, required
        - `amount` string, required
        - `chain` string, required
        - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `feeBreakdown` GatewayOnrampFeeBreakdownV2, required
        - `affiliateFee` GatewayTokenAmountV2, required
          - `address` string, required
          - `amount` string, required
          - `chain` string, required
          - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
        - `executionFee` GatewayTokenAmountV2, required
          - `address` string, required
          - `amount` string, required
          - `chain` string, required
          - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
        - `layerzeroFee` GatewayTokenAmountV2, required
          - `address` string, required
          - `amount` string, required
          - `chain` string, required
          - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
        - `protocolFee` GatewayTokenAmountV2, required
          - `address` string, required
          - `amount` string, required
          - `chain` string, required
          - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
        - `solverFee` GatewayTokenAmountV2, required
          - `address` string, required
          - `amount` string, required
          - `chain` string, required
          - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `fees` GatewayTokenAmountV2, required
        - `address` string, required
        - `amount` string, required
        - `chain` string, required
        - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `gasRefill` string, nullable — Optional gas refill amount
      - `inputAmount` GatewayTokenAmountV2, required
        - `address` string, required
        - `amount` string, required
        - `chain` string, required
        - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `outputAmount` GatewayTokenAmountV2, required
        - `address` string, required
        - `amount` string, required
        - `chain` string, required
        - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `priceImpact` string, nullable — Price impact as a fraction, e.g. `"-0.05"` means 5% loss. Absent if no price feed is available.
      - `priceImpactUsd` string, nullable — Price impact in USD, excluding execution fee. E.g. `"-1.00"` means $1 loss. Absent if no price feed is available.
      - `recipient` string, required — Recipient address
      - `sender` string, nullable — Sender address
      - `signedQuoteData` string, required — The signed quote data to be used in create-order
      - `slippage` string, required — Slippage tolerance
      - `strategyAddress` string, nullable
      - `strategyMessage` string, nullable
      - `token` string, required — Token address
  - object
    - `offramp` GatewayOfframpQuoteV2, required
      - `affiliateAddress` string, nullable — Affiliate address (V1-compatible field; first entry from `affiliates`).
      - `affiliates` ResolvedAffiliate[] — Resolved affiliate recipients and computed fees (V2).
        - `address` string, required — Affiliate recipient address.
        - `fee` GatewayTokenAmountV2, required
          - `address` string, required
          - `amount` string, required
          - `chain` string, required
          - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `estimatedTimeInSecs` integer, nullable — Estimated time in secs to complete the Order
      - `feeBreakdown` GatewayOfframpFeeBreakdownV2, required — V2 offramp fee breakdown. Same shape as V1 but each line carries USD.
        - `affiliateFee` GatewayTokenAmountV2, required
          - `address` string, required
          - `amount` string, required
          - `chain` string, required
          - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
        - `fastestFeeRate` string, required
        - `inclusionFee` GatewayTokenAmountV2, required
          - `address` string, required
          - `amount` string, required
          - `chain` string, required
          - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
        - `protocolFee` GatewayTokenAmountV2, required
          - `address` string, required
          - `amount` string, required
          - `chain` string, required
          - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
        - `solverFee` GatewayTokenAmountV2, required
          - `address` string, required
          - `amount` string, required
          - `chain` string, required
          - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `inputAmount` GatewayTokenAmountV2, required
        - `address` string, required
        - `amount` string, required
        - `chain` string, required
        - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `outputAmount` GatewayTokenAmountV2, required
        - `address` string, required
        - `amount` string, required
        - `chain` string, required
        - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `priceImpact` string, nullable — Price impact as a fraction, e.g. `"-0.05"` means 5% loss. Absent if no price feed is available.
      - `priceImpactUsd` string, nullable — Price impact in USD, excluding execution fee. E.g. `"-1.00"` means $1 loss. Absent if no price feed is available.
      - `recipient` string, required
      - `sender` string, nullable
      - `slippage` integer, required
      - `srcChain` string, required
      - `tokenAddress` string, required
      - `totalFeeUsd` string, required
      - `txTo` string, required
  - object
    - `tokenSwap` GatewayTokenSwapQuoteV2, required
      - `dstChain` string, required
      - `estimatedTimeInSecs` integer, required — Estimated time in secs to complete the Order
      - `fees` GatewayTokenAmountV2, required
        - `address` string, required
        - `amount` string, required
        - `chain` string, required
        - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `inputAmount` GatewayTokenAmountV2, required
        - `address` string, required
        - `amount` string, required
        - `chain` string, required
        - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `outputAmount` GatewayTokenAmountV2, required
        - `address` string, required
        - `amount` string, required
        - `chain` string, required
        - `usd` string, nullable — USD value of `amount`, absent if no price feed is available.
      - `priceImpact` string, nullable — Price impact as a fraction, e.g. `"-0.05"` means 5% loss. Absent if no price feed is available.
      - `priceImpactUsd` string, nullable — Price impact in USD, excluding execution fee. E.g. `"-1.00"` means $1 loss. Absent if no price feed is available.
      - `recipient` string, required
      - `sender` string, nullable
      - `slippage` integer, required
      - `srcChain` string, required
      - `txTo` string, required

## Response `201`

Created order

- union — V2 create-order response
  - object
    - `onramp` object, required
      - `address` string, required — Bitcoin address to pay to
      - `op_return_data` string, nullable — Optional OP_RETURN data
      - `order_id` string, required — Unique order id
      - `psbt_hex` string, nullable — Hex-encoded Bitcoin PSBT (only present when sender address was provided)
  - object
    - `offramp` object, required
      - `order_id` string, required — Unique order id
      - `tx` TxInfo, required
        - `chain` string, required
        - `data` string, required
        - `to` string, required
        - `value` string, required
  - object
    - `tokenSwap` object, required
      - `order_id` string, required — Unique order id
      - `tx` TxInfo, required
        - `chain` string, required
        - `data` string, required
        - `to` string, required
        - `value` string, required

## Other responses

- `400` — Create order error

---

[API](https://skmtc.net/bob-collective/apis/bob-gateway-api.md) · [All operations](https://skmtc.net/bob-collective/apis/bob-gateway-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bob-collective/bob-gateway-api/versions/5a00610487e4/schema)
