Create a trade offer

This endpoint is responsible for initiating a buy/sell trade offer on behalf of the user.

The request triggers the creation of a trade offer that can later be accepted by the user within its validity (as defined in offer_validity & expires_at response parameters).
The offer includes details such as the asset to be traded, the fiat currency and the amount either in fiat currency or in units of the asset being traded. By accommodating both fiat and asset unit denominations, the user experience is enhanced, catering to a wide range of trading preferences and strategies.

The trade offer response outlines the details of the proposed trade, including: asset, amount, price, fees, preliminary tax calculations if applicable, and any warning messages relevant to the user.

SecuritybearerAuth
Request
header Parameters
bp-user-id
required
string <uuid>

User ID

Request Body schema: application/json

The offer to be created.

type
required
string

Offer Type

Enum: "buy" "sell"
fiat_id
required
integer

Fiat ID

asset_id
required
integer

Asset Id

amount
required
string

Transaction amount

amount_defined_for
required
string

Amount define for

Enum: "fiat" "asset"
Responses
201

New offer has been created

401

User not verified

404

Error

409

Insufficient funds

422

Error

429

Too Many Requests

500

Error

503

Maintenance or Service unavailable

post/v1/offers
Request samples
application/json
{
  • "type": "buy",
  • "fiat_id": 1,
  • "asset_id": 1,
  • "amount": "1.99",
  • "amount_defined_for": "fiat"
}
Response samples
application/json
{
  • "data": {
    }
}