---
title: "Get best offer using trade parameters"
method: GET
path: "/exchange/api/offers/best-offer"
tags: ["exchange-external-api"]
---

# Get best offer using trade parameters

`GET /exchange/api/offers/best-offer`

## Query parameters

- `offerType` 'ONRAMP' | 'OFFRAMP'
- `token` string
- `fiat` string
- `tokenAmount` number
- `fiatAmount` number
- `networkId` string
- `paymentChannel` string

## Response `200`

Success

- object
  - `offer` BestOfferDTO, required
    - `offer` OfferDto, required
      - `offerId` string, required — external offer id
      - `userId` string, required — userId of the merchant that created offer
      - `network` string, required — id of network on which the asset is on
      - `tokenSymbol` string, required — symbol of token been sold or bought
      - `fiatSymbol` string, required — ISO 4217 code for fiat currency
      - `offerType` 'ONRAMP' | 'OFFRAMP', required
      - `behaviour` 'FIXED' | 'FLEXIBLE', required — Offer rate behavior
      - `totalUnit` number, required — offer total unit in fiat
      - `tradedUnit` number, required — units that has been traded out of the total unit
      - `lockedUnit` number, required — units that has been locked out of the offer total unit
      - `rate` number, required — price rate to buy or sell
      - `rateCap` number — The minimum (for onramp) or maximum (for offramp) rate allowed for this ad if it's a flexible ad
      - `paymentMethods` OfferPaymentMethod[], required
        - `channelId` string
        - `channelName` string
        - `channelType` string
        - `color` OfferPaymentChannelColor
          - `bg` string, required
          - `fg` string, required
        - `id` string
      - `paymentChannels` OfferPaymentChannel[]
        - `channelId` string
        - `channelName` string
        - `channelType` string
        - `color` OfferPaymentChannelColor
          - `bg` string, required
          - `fg` string, required
      - `flexibleOfferMargin` number — offer margin in percentage allowed for flexible offers
      - `status` 'PENDING' | 'ACTIVE' | 'OFFLINE' | 'LOW_BALANCE' | 'LIMIT_REACHED', required — the current offer status
      - `partnerDisplayName` string, required — Partner's display name
      - `partnerRating` number, required
      - `partnerStats` PartnerStats
        - `partnerId` string, uuid
        - `averageRating` number
        - `totalTransactions` number
        - `tradeCount` number
        - `completionPercentage` number, double
        - `averageResponseTime` number, double
      - `statusReason` string — the reason for the current status - mostly applied to non active or offline status
      - `tradeMinimumLimit` number, required — minimum trade limit
      - `tradeMaximumLimit` number, required — maximum trade limit
      - `previewImageUrl` string — preview image url
      - `maxTimeout` object
        - `deposit` integer — timeout for buyer to pay in seconds
        - `confirmation` integer — timeout for seller to confirm in seconds
      - `feeConfig` FeeConfig
        - `tradeType` 'ONRAMP' | 'OFFRAMP'
        - `tradeMode` 'P2P' | 'IP' | 'OTC'
        - `base` number, required — Flat fee that must be paid for irrespective of percentage fee
        - `tradePercentage` number, required — Fee described as a percentage of the trade
        - `cap` number — Maximum value a fee is allowed to have
        - `network` string, required — The network this config should be applied to(There will always be at least one fee config, that config will have network value of `default`
      - `feeConfigs` FeeConfig[]
        - `tradeType` 'ONRAMP' | 'OFFRAMP'
        - `tradeMode` 'P2P' | 'IP' | 'OTC'
        - `base` number, required — Flat fee that must be paid for irrespective of percentage fee
        - `tradePercentage` number, required — Fee described as a percentage of the trade
        - `cap` number — Maximum value a fee is allowed to have
        - `network` string, required — The network this config should be applied to(There will always be at least one fee config, that config will have network value of `default`
      - `tradeCriteria` TradeCriteria
        - `verifiedKyc` boolean
      - `autoResponseMessage` string — auto response message to be shown to customers
      - `adNote` string — note to be shown to the customer
      - `tradeRequestBroadcastId` string — trade request broadcast id
      - `isPrivate` boolean — Indicates if an ad should be hidden from the public and treated as a private ad.
      - `isRateHidden` boolean — Indicates if rate is hidden
      - `instantPayEnabled` boolean — Is instant pay enabled for offer
      - `instantPayLimit` number — Max tradeable by instant pay on this add. (In fiat value)
      - `instantPayMinimum` number — minimum tradeable by instant pay on this add. (In fiat value)
      - `instantPayAccountId` string — Account id of instantpay. Useful especially for onramp payins
      - `customPayinProvider` string — Provider for custom payin (ONRAMP only)
      - `createdAt` string, date-time, required — Timestamp field.
      - `updatedAt` string, date-time, required — Timestamp field.
      - `editedAt` string, date-time, required — Timestamp field.
      - `partnerLastActiveAt` string, date-time, required — Timestamp field.
      - `primaryEscrowAddress` string
      - `fiatTradeMinimumLimit` number
      - `fiatTradeMaximumLimit` number
      - `maxFiatLimit` number, required — Maximum fiat limit consideration available units
      - `availableUnits` number, required — Calculated available units when locked and traded units are deducted
      - `fulfillOrderAs` 'BUSINESS' | 'PERSONAL'
      - `autoRefillEnabled` boolean — Flag indicating if auto refill is enabled for this ad
      - `autoRefillConfig` AutoRefillConfig
        - `threshold` number, required — If ad available unit go belows this value the system would trigger a auto refill
        - `amount` number, required — The token amount to refill the ad with
    - `orderRequestTradeId` string, required
  - `orderRequestTradeId` string, required

## Other responses

- `400` — Bad request
- `401` — Unauthorized request
- `500` — Server error

---

[API](https://skmtc.net/nestechops/apis/onboard-external-api-gateway.md) · [All operations](https://skmtc.net/nestechops/apis/onboard-external-api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nestechops/onboard-external-api-gateway/revisions/35fe01ca087b/schema)
