On this page

latest contributor to this doc

Last Edit:

@smk762

Order Common Structures

structuresorders_common_structures

ParameterTypeRequiredDefaultDescription
idstring-Protocol id.
titlestring-Protocol title.
imgstring-Link to protocol image.
img_colorstring-Link to protocol image color.

ParameterTypeRequiredDefaultDescription
namestring-Liquidity source name.
partnumeric-Protocol part.
from_token_addressstring-From-token contract address.
to_token_addressnumeric-To-token contract address.

ParameterTypeRequiredDefaultDescription
addressstring-Token contract address.
symbolstring-Token symbol.
namestring-Token name.
decimalsnumeric-Number of digits after decimal point for the token amount.
eip2612boolean-Is Eip-2612 supported.
is_fotboolean-Is FoT token.
logo_uristring-Token logo uri.
tagslist of string-Token tags.

ParameterTypeRequiredDefaultDescription
fromstring-From address
tostring-To address
datastring-Transaction data
valuenumeric-Transaction value
gas_pricefloat-Gas price
gasnumeric-Gas

ParameterTypeRequiredDefaultDescription
Typestring-All to cancel all orders; Pair to cancel all orders for specific coin pairs; Coin to cancel all orders for a specific coin
dataobject-additional data the cancel condition; present with Pair and Coin types
data.basestring-base coin of the pair; Pair type only
data.relstring-rel coin of the pair; Pair type only
data.tickerstring-order is cancelled if it uses ticker as base or rel; Coin type only

ParameterTypeRequiredDefaultDescription
base_confsnumber-Number of required confirmations on the base coin's blockchain for a transaction to complete an atomic swap event.
base_notabool-Whether dPoW notarization is required on the base coin's blockchain for a transaction to complete an atomic swap event.
rel_confsnumber-Number of required confirmations on the rel coin's blockchain for a transaction to complete an atomic swap event.
rel_notabool-Whether dPoW notarization is required on the rel coin's blockchain for a transaction to complete an atomic swap event.

ParameterTypeRequiredDefaultDescription
TypestringAnyAny to match with any other order; Orders to select specific uuids; Pubkeys to select specific nodes
dataarray of strings-A list of order uuids (to match for Orders type) or pubkeys of nodes (to match for Pubkeys type)

ParameterTypeRequiredDefaultDescription
address_typestring-Generally Transparent, but may be Shielded for supporting coins.
address_datastring-The actual address text for sending and receiving funds.

ParameterTypeDescription
coinstringThe ticker of the coin
addressstringThe address offering the trade
pricestring (decimal)The price the user is willing to buy or sell per one unit of the coin from request
price_ratrationalThe price represented as a standard RationalValue object.
price_fractionobjectThe price represented as a standard FractionalValue object.
maxvolumestring (decimal)The maximum amount of base the offer provider is willing to sell
max_volume_ratrationalThe max volume represented as a standard RationalValue object.
max_volume_fractionobjectThe max volume represented as a standard FractionalValue object.
min_volumestring (decimal)The minimum amount of base coin the offer provider is willing to sell
min_volume_ratrationalThe min volume represented as a standard RationalValue object.
min_volume_fractionobjectThe min volume represented as a standard FractionalValue object.
pubkeystringThe pubkey of the offer provider
agenumberThe age of the offer (in seconds)
zcreditsnumberThe zeroconf deposit amount (deprecated)
netidnumberThe id of the network on which the request is made
uuidstringThe uuid of order
is_mineboolWhether the order is placed by me
base_max_volumestring (decimal)The maximum amount of base coin the offer provider is willing to buy or sell
base_max_volume_ratrationalThe base_max_volume represented as a standard RationalValue object.
base_max_volume_fractionobjectThe base_max_volume represented as a standard FractionalValue object.
base_min_volumestring (decimal)The minimum amount of base coin the offer provider is willing to buy or sell
base_min_volume_ratrationalThe base_min_volume represented as a standard RationalValue object.
base_min_volume_fractionobjectThe base_min_volume represented as a standard FractionalValue object.
base_confsnumberThe confirmations settings of base coin set by the offer provider
base_notaboolThe notarisation settings of base coin set by the offer provider
rel_max_volumestring (decimal)The maximum amount of rel coin the offer provider is willing to buy or sell
rel_max_volume_ratrationalThe rel_max_volume max volume represented as a standard RationalValue object.
rel_max_volume_fractionobjectThe rel_max_volume max volume represented as a standard FractionalValue object.
rel_min_volumestring (decimal)The minimum amount of rel coin the offer provider is willing to buy or sell
rel_min_volume_ratrationalThe rel_min_volume represented as a standard RationalValue object.
rel_min_volume_fractionobjectThe rel_min_volume represented as a standard FractionalValue object.
rel_confsnumberThe confirmations settings of rel coin set by the offer provider
rel_notaboolThe notarisation settings of rel coin set by the offer provider
original_tickerslist (string)Tickers included in response when orderbook_ticker is configured for the queried coin in coins file

ParameterTypeDescription
coinstringThe ticker of the coin
addressobjectA standard OrderAddress object.
priceobjectA standard NumericFormatsValue object representing the coin price.
base_min_volumeobjectA standard NumericFormatsValue object representing the minimum base volume.
base_max_volumeobjectA standard NumericFormatsValue object representing the maximum base volume.
base_max_volume_aggrobjectOrderbook (v2) only. A standard NumericFormatsValue object representing the maximum aggregated base amount at the specified price. The sum of max base volumes of the current order and all orders with a worse price.
rel_min_volumeobjectA standard NumericFormatsValue object representing the minimum rel volume.
rel_max_volumeobjectA standard NumericFormatsValue object representing the maximum rel volume.
rel_max_volume_aggrobjectOrderbook (v2) only. A standard NumericFormatsValue object representing the maximum aggregated rel amount at the specified price. The sum of max rel volumes of the current order and all orders with a worse price.
pubkeystringThe pubkey of the offer provider
uuidstringThe uuid of order
is_mineboolWhether the order is placed by me
conf_settingsobjectA standard ConfSettings object.

ParameterTypeDescription
basestringbase currency
relstringrel currency
pricenumberorder price as decimal number
price_ratrational numberorder price as rational number
max_base_volnumberMaximum trade volume
max_base_vol_ratrational numberMaximum trade volume as rational number
min_base_volnumberMinimum trade volume
min_base_vol_ratrational numberMinimum trade volume as rational number
created_atnumberTimestamp of order creation
updated_atnumberTimestamp of last order update
matcheslistUUIDS of matching orders
started_swapslistUUIDS of swaps started
uuidstringUUID of this order
conf_settingsobjectConfirmation / Notarisation settings for order
base_orderbook_tickerstringThe ticker of the base currency if orderbook_ticker is configured for the base currency in coins file. If not defined, will return a null value.
rel_orderbook_tickerstringThe ticker of the rel currency if orderbook_ticker is configured for the rel currency in coins file. If not defined, will return a null value.
cancellablebooleantrue if order is in a state which it can be cancelled. false if not (e.g. swap is in progress)
cancellation_reasonstringCancelled indicates order was withdrawn by user. Fulfilled indicates order was swapped successfully. TimedOut indicates a taker order with type FillOrKill expired before matching.
available_amountstringFunds available for order to be matched against, taking into account current spendable balance and max_volume

ParameterTypeDescription
coinstringThe ticker of the coin
addressstringThe address offering the trade
pricestring (decimal)The price the user is willing to buy or sell per one unit of the coin from request
price_ratrationalThe price represented as a standard RationalValue object.
price_fractionobjectThe price represented as a standard FractionalValue object.
maxvolumestring (decimal)The maximum amount of base the offer provider is willing to sell
max_volume_ratrationalThe max volume represented as a standard RationalValue object.
max_volume_fractionobjectThe max volume represented as a standard FractionalValue object.
min_volumestring (decimal)The minimum amount of base coin the offer provider is willing to sell
min_volume_ratrationalThe min volume represented as a standard RationalValue object.
min_volume_fractionobjectThe min volume represented as a standard FractionalValue object.
pubkeystringThe pubkey of the offer provider
agenumberThe age of the offer (in seconds)
zcreditsnumberThe zeroconf deposit amount (deprecated)
netidnumberThe id of the network on which the request is made
uuidstringThe uuid of order
is_mineboolWhether the order is placed by me
base_max_volumestring (decimal)The maximum amount of base coin the offer provider is willing to buy or sell
base_max_volume_ratrationalThe base_max_volume represented as a standard RationalValue object.
base_max_volume_fractionobjectThe base_max_volume represented as a standard FractionalValue object.
base_min_volumestring (decimal)The minimum amount of base coin the offer provider is willing to buy or sell
base_min_volume_ratrationalThe base_min_volume represented as a standard RationalValue object.
base_min_volume_fractionobjectThe base_min_volume represented as a standard FractionalValue object.
base_confsnumberThe confirmations settings of base coin set by the offer provider
base_notaboolThe notarisation settings of base coin set by the offer provider
rel_max_volumestring (decimal)The maximum amount of rel coin the offer provider is willing to buy or sell
rel_max_volume_ratrationalThe rel_max_volume max volume represented as a standard RationalValue object.
rel_max_volume_fractionobjectThe rel_max_volume max volume represented as a standard FractionalValue object.
rel_min_volumestring (decimal)The minimum amount of rel coin the offer provider is willing to buy or sell
rel_min_volume_ratrationalThe rel_min_volume represented as a standard RationalValue object.
rel_min_volume_fractionobjectThe rel_min_volume represented as a standard FractionalValue object.
rel_confsnumberThe confirmations settings of rel coin set by the offer provider
rel_notaboolThe notarisation settings of rel coin set by the offer provider
original_tickerslist (string)Tickers included in response when orderbook_ticker is configured for the queried coin in coins file

ParameterTypeDescription
coinstringThe ticker of the coin
addressobjectA standard OrderAddress object.
priceobjectA standard NumericFormatsValue object representing the coin price.
base_min_volumeobjectA standard NumericFormatsValue object representing the minimum base volume.
base_max_volumeobjectA standard NumericFormatsValue object representing the maximum base volume.
base_max_volume_aggrobjectOrderbook (v2) only. A standard NumericFormatsValue object representing the maximum aggregated base amount at the specified price. The sum of max base volumes of the current order and all orders with a worse price.
rel_min_volumeobjectA standard NumericFormatsValue object representing the minimum rel volume.
rel_max_volumeobjectA standard NumericFormatsValue object representing the maximum rel volume.
rel_max_volume_aggrobjectOrderbook (v2) only. A standard NumericFormatsValue object representing the maximum aggregated rel amount at the specified price. The sum of max rel volumes of the current order and all orders with a worse price.
pubkeystringThe pubkey of the offer provider
uuidstringThe uuid of order
is_mineboolWhether the order is placed by me
conf_settingsobjectA standard ConfSettings object.

ParameterTypeDescription
uuidstringuuid of the order
order_typestringType of the order; "Maker" or "Taker"
basestringbase coin of the order
relstringrel coin of the order
pricenumber (decimal)price of the order
volumenumber (decimal)volume of the order
created_atnumberunix timestamp in milliseconds, indicating the order creation time
last_updatednumberunix timestamp in milliseconds, indicating the time the order was last updated
Was_takernumber1 if the order was a "Taker" order that got converted to "Maker", 0 otherwise
statusstringstatus of the Order

ParameterTypeRequiredDescription
TypestringThere are two types from which to choose: GoodTillCancelled and FillOrKill. The GoodTillCancelled order is automatically converted to a maker order if the order is not matched in 30 seconds, and this maker order stays in the orderbook until explicitly cancelled. On the other hand, a FillOrKill order is cancelled if it is not matched within 30 seconds. The default type is GoodTillCancelled

If your order includes UTXO coins activated via electrum, and connection to its servers is lost, your order will automatically cancel and will need to be recreated once the connection is restored.

ParameterTypeRequiredDescription
typeintegerDefines whether requesting by volume or by number.
valuenumeric stringIf type is volume, the amount of coin (defined in the parent object) the user is willing to buy or sell. If type is number, the number of best price trades to return.

Used in orderbook_depth responses to represent the depth information for a trading pair.

ParameterTypeRequiredDescription
pairstringTrading pair name
asksarray of [decimal]Array of ask price levels
bidsarray of [decimal]Array of bid price levels

Used within PairDepth objects to represent ask and bid counts.

ParameterTypeDescription
asksnumberThe number of asks for this trading pair
bidsnumberThe number of bids for this trading pair