Skip to main content
POST
Get an atomic quote

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

POST /v2/swap/atomic/quote.

amount
integer<int64>
required

Sats for BTC, the RGB contract's smallest unit for the asset.

Required range: x >= 1
pair
string
required

BTC/USDT-RGB (send BTC, receive USDT-RGB) or USDT-RGB/BTC.

direction
enum<string>

Which amount of a quote request is fixed.

Available options:
from,
to

Response

Quote and rgb-lib offer.

assetId
string
required

The RGB contract of the RGB leg.

direction
enum<string>
required

Which amount of a quote request is fixed.

Available options:
from,
to
expiresAt
integer<int64>
required

Unix seconds: the request must arrive before this.

fromAmount
integer<int64>
required

What the taker sends.

Required range: x >= 0
id
string
required
networkFeeSat
integer<int64>
required

Miner fee the taker funds on top of fromAmount, sats.

Required range: x >= 0
offer
object
required

rgb-lib's offer, for the taker's accept_swap_offer.

offerExpiresAt
integer<int64>
required

Unix seconds: the completion must arrive before this.

pair
string
required
serviceFee
integer<int64>
required

The maker's fee, in the output asset's units: sats, or the RGB contract's.

Required range: x >= 0
toAmount
integer<int64>
required

What the taker receives, net of the maker's fee.

Required range: x >= 0