GET
/
offers
/
best-offer
curl --request GET \
  --url https://onboard-external-dev.api.nestcoin.io/offers/best-offer
{
  "offerId": "<string>",
  "userId": "<string>",
  "network": "<string>",
  "tokenSymbol": "BNB",
  "fiatSymbol": "USD, NGN",
  "offerType": "ONRAMP",
  "behaviour": "FIXED",
  "totalUnit": 5000,
  "tradedUnit": 5000,
  "lockedUnit": 5000,
  "rate": 500,
  "rateCap": 500,
  "paymentMethods": [
    {
      "channelId": "<string>",
      "channelName": "<string>",
      "channelType": "<string>",
      "color": {
        "bg": "<string>",
        "fg": "<string>"
      },
      "id": "<string>"
    }
  ],
  "paymentChannels": [
    {
      "channelId": "<string>",
      "channelName": "<string>",
      "channelType": "<string>",
      "color": {
        "bg": "<string>",
        "fg": "<string>"
      }
    }
  ],
  "flexibleOfferMargin": 10,
  "status": "ACTIVE",
  "partnerDisplayName": "<string>",
  "partnerRating": -1,
  "partnerStats": {
    "partnerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "averageRating": 3,
    "totalTransactions": 123,
    "tradeCount": 123,
    "completionPercentage": 94,
    "averageResponseTime": 5
  },
  "statusReason": "<string>",
  "tradeMinimumLimit": 123,
  "tradeMaximumLimit": 123,
  "previewImageUrl": "<string>",
  "maxTimeout": {
    "deposit": 1440,
    "confirmation": 600
  },
  "feeConfig": {
    "tradeType": "ONRAMP",
    "tradeMode": "P2P",
    "base": 123,
    "tradePercentage": 123,
    "cap": 123,
    "network": "<string>"
  },
  "feeConfigs": [
    {
      "tradeType": "ONRAMP",
      "tradeMode": "P2P",
      "base": 123,
      "tradePercentage": 123,
      "cap": 123,
      "network": "<string>"
    }
  ],
  "tradeCriteria": {
    "verifiedKyc": true
  },
  "autoResponseMessage": "<string>",
  "adNote": "<string>",
  "tradeRequestBroadcastId": "<string>",
  "isPrivate": true,
  "isRateHidden": true,
  "instantPayEnabled": false,
  "instantPayLimit": 123,
  "instantPayMinimum": 123,
  "instantPayAccountId": "<string>",
  "customPayinProvider": "<string>",
  "latestCounterOffer": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "offerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "otherUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "rate": 500,
    "previousCounterRate": 500,
    "previousCounterId": "<string>",
    "status": "PENDING",
    "statusReason": "<string>",
    "message": "<string>",
    "tradeRequestBroadcastId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "deletedAt": "2023-11-07T05:31:56Z"
  },
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "editedAt": "2023-11-07T05:31:56Z",
  "partnerLastActiveAt": "2023-11-07T05:31:56Z",
  "primaryEscrowAddress": "<string>",
  "fiatTradeMinimumLimit": 123,
  "fiatTradeMaximumLimit": 123,
  "maxFiatLimit": 123,
  "availableUnits": 123
}

Automatically retrieves a single offer that best matches the user’s trading parameters. This offer is optimized for factors such as merchant availability, competitive rates, and faster completion times, providing a seamless trading experience.

Query Parameters

unitAmount
number
fiatUnitAmount
number
network
string

Blockchain network identifier

tokenSymbol
string
fiatSymbol
string
offerType
string
paymentChannel
string
exemptedMerchants
string[]
prioritizeIp
boolean

Response

200
application/json
Success
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
enum<string>
required
Available options:
ONRAMP,
OFFRAMP
behaviour
enum<string>
required

Offer rate behavior

Available options:
FIXED,
FLEXIBLE
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

paymentMethods
object[]
required
status
enum<string>
default:
ACTIVE
required

the current offer status

Available options:
PENDING,
ACTIVE,
OFFLINE,
LOW_BALANCE,
LIMIT_REACHED
partnerDisplayName
string
required

Partner's display name

partnerRating
number
required
tradeMinimumLimit
number
required

minumum trade limit

tradeMaximumLimit
number
required

maximum trade limit

createdAt
string
required

Timestamp field.

updatedAt
string
required

Timestamp field.

editedAt
string
required

Timestamp field.

partnerLastActiveAt
string
required

Timestamp field.

maxFiatLimit
number
required

Maximum fiat limit consideration available units

availableUnits
number
required

Calculated available units when locked and traded units are deducted

rateCap
number

The minimum (for onramp) or maximum (for offramp) rate allowed for this ad if it's a flexible ad

paymentChannels
object[]
flexibleOfferMargin
number

offer margin in percentage allowed for flexible offers

partnerStats
object
statusReason
string

the reason for the current status - mostly applied to non active or offline status

previewImageUrl
string

preview image url

maxTimeout
object
feeConfig
object
feeConfigs
object[]
tradeCriteria
object
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
default:
false

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)

latestCounterOffer
object
primaryEscrowAddress
string
fiatTradeMinimumLimit
number
fiatTradeMaximumLimit
number