---
title: "Fill Order"
method: POST
path: "/defi/v1/dex/fillorder"
tags: ["dex"]
---

# Fill Order

`POST /defi/v1/dex/fillorder`

## Request

- Base URL: `https://svc.blockdaemon.com`
- URL: `https://svc.blockdaemon.com/defi/v1/dex/fillorder`
- Auth: API key in header `X-API-Key`

Facilitates the execution (“filling”) of an existing limit order on a decentralized exchange by specifying the order ID, taker address, and offered token amount. The endpoint returns transaction data (chain ID, addresses, gas details, etc.) and a reference ID, enabling secure settlement of trades while providing a clear audit trail.

> 💡 
**Compute Unit Value:** `25` (Fixed)

## Request body

- DexFillorderRequest: The request body for a /defi/v1/dex/fillorder
  - `dexId` '2200' | '2201' | '2202' | '2203' | '2204' | '2205' | '2206': The unique ID to specify the decentralized exchange (DEX) within a particular blockchain. Find more [here](https://docs.blockdaemon.com/docs/defi-api-supported-protocols#supported-dexs-protocols).
  - `orderId` string[], required: The ID of the limit order to be filled.
  - `from` string, required: The wallet address of the Taker that will receive the Maker asset.
  - `amountIn` string, required: Amount of the input token to provide, specified in the token's smallest denomination (base units). Do not send human-readable decimal values. Examples: to swap 1 WETH (18 decimals), use "1000000000000000000"; to swap 1 USDC (6 decimals), use "1000000".
  - `gas` string: Maximum number of gas units to allocate for the transaction, as an integer string (e.g., '200000'). If omitted, gas is estimated automatically. Note: this is gas units, not wei or gwei.
  - `gasPriority` string: Specifies the priority level for gas fees (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost.
  - `enableFee` boolean: Flag to include a basis points fee transaction alongside the main transaction when set to true.

## Response `200`

Successful response

- object
  - `status` integer
  - `msg` string
  - `data` object

---

[API](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api.md) - [All operations](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/llms.txt) - [OpenAPI document](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/revisions/ec053b7c8041?raw)
