Skip to main content
Version: 2.0.4

Order

MatchedOrder

The MatchedOrder type represents a successfully matched order in the system. It contains the following properties:

PropertyTypeDescription
created_atstringTimestamp when the order was created
updated_atstringTimestamp when the order was last updated
deleted_atstring | nullTimestamp when the order was deleted, or null if active
source_swapSwapThe source swap details
destination_swapSwapThe destination swap details
create_orderCreateOrderThe order creation details

Swap

The Swap type represents the details of a swap transaction on a specific blockchain involved in an atomic swap. Each order in the system has two swaps associated with it:

  • Source Swap: Represents the transaction on the initiator's source chain.
  • Destination Swap: Represents the transaction on the follower's destination chain.
PropertyTypeDescription
created_atstringTimestamp when the swap was created
updated_atstringTimestamp when the swap was last updated
deleted_atstring | nullTimestamp when the swap was deleted, or null if active
swap_idstringUnique identifier for the swap
chainChainThe blockchain network where the swap occurs
assetstringThe asset being swapped
initiatorstringAddress of the party initiating the swap
redeemerstringAddress of the party redeeming the swap
timelocknumberTime lock period for the swap
filled_amountstringAmount that has been filled in the swap
amountstringTotal amount of the swap
secret_hashstringHash of the secret used in the atomic swap
secretstringSecret value used in the atomic swap
initiate_tx_hashstringTransaction hash of the swap initiation
redeem_tx_hashstringTransaction hash of the swap redemption
refund_tx_hashstringTransaction hash of the swap refund
initiate_block_numberstring | nullBlock number of the initiation, or null if not initiated
redeem_block_numberstring | nullBlock number of the redemption, or null if not redeemed
refund_block_numberstring | nullBlock number of the refund, or null if not refunded
required_confirmationsnumberNumber of confirmations required for the swap

CreateOrder

The CreateOrder type represents the details of an order creation request. It contains the following properties:

PropertyTypeDescription
(All properties from CreateOrderRequest)-As described in the CreateOrderRequest section.
created_atstringTimestamp when the order was created
updated_atstringTimestamp when the order was last updated
deleted_atstring | nullTimestamp when the order was deleted, or null if active
create_idstringUnique identifier for the order creation
block_numberstringBlock number where the order was created
additional_dataAdditionalDataAdditional data for the order.

CreateOrderRequest

The CreateOrderRequest type represents the details of an order creation request. It contains the following properties:

PropertyTypeDescription
source_chainChainThe blockchain network for the source asset
destination_chainChainThe blockchain network for the destination asset
source_assetstringThe asset being sent
destination_assetstringThe asset being received
initiator_source_addressstringThe address of the initiator on the source chain, or the public key if the chain is Bitcoin
initiator_destination_addressstringThe address of the initiator on the destination chain, or the public key if the chain is Bitcoin
source_amountstringAmount of source asset (as BigDecimal string)
destination_amountstringAmount of destination asset (as BigDecimal string)
feestringFee amount (as BigDecimal string)
noncestringNonce value (as BigDecimal string)
min_destination_confirmationsnumberMinimum required confirmations on destination chain
timelocknumberTime lock period for the order
secret_hashstringHash of the secret used in the atomic swap
  • Asset should be the contract address of the token that needs to be swapped, and 'primary' in the case of Bitcoin-related transactions.

AdditionalData

The AdditionalData type represents additional data for the order. It contains the following properties:

PropertyTypeDescription
strategy_idstringThe identifier of the strategy used for the order.
sigstringThe signature for the order object, attested by the quote server.
input_token_pricenumberThe price of the input token at the time of order creation.
output_token_pricenumberThe price of the output token at the time of order creation.
deadlinenumberThe deadline for the order to be submitted in UNIX time.
bitcoin_optional_recipientstring | undefinedThis field must be provided if the swap involves the Bitcoin chain. It represents the address where Bitcoin funds will be transferred in case of a refund or redeem.

CreateOrderReqWithStrategyId

The CreateOrderReqWithStrategyId type represents the details of an order creation request with a strategy ID. It contains the following properties:

PropertyTypeDescription
(All properties from CreateOrderRequest)-As described in the CreateOrderRequest section.
additional_data{strategy_id: string;bitcoin_optional_recipient?: string;}As described in the AdditionalData section.

CreateOrderRequestWithAdditionalData

The CreateOrderRequestWithAdditionalData type represents the details of an order creation request with additional data. It contains the following properties:

PropertyTypeDescription
(All properties from CreateOrderRequest)-As described in the CreateOrderRequest section.
(All properties from AdditionalData)-As described in the AdditionalData section.