REST API
Last updated
Last updated
The signature for creating an order can be either from an EVM or a Bitcoin wallet, regardless of the assets being traded. However, before an order containing a Bitcoin asset can be placed, a Bitcoin wallet must have been authorized; conversely, before an order containing an EVM asset can be placed, an EVM wallet must have been authorized. See the Authorize wallet API call below.
When signing an order with a fixed amount with an EVM wallet, create the signature by signing this EIP-712 message:
When signing an order with a percentage amount with an EVM wallet, create the signature by signing this EIP-712 message:
When signing an order with a Bitcoin wallet, create the signature by signing a message constructed as follows:
The bitcoin signature should be created following the same rules as for authentication.
The signature for cancelling an order can be either from an EVM or a Bitcoin wallet, regardless of the assets being traded.
When signing an order cancellation with an EVM wallet, create the signature by signing this EIP-712 message:
When signing an order cancellation with a Bitcoin wallet, create the signature by signing a message constructed as follows:
The bitcoin signature should be created following the same rules as for authentication.
When withdrawing an EVM asset, create the signature by signing this EIP-712 message (the chainId must be the correct one for the token being withdrawn):
When withdrawing a Bitcoin asset, create the signature by signing this message:
The bitcoin signature should be created following the same rules as for authentication.
This is used to authorize a Bitcoin wallet for an existing EVM account, or to authorize an EVM wallet for an existing Bitcoin account. A given account can have at most 1 Bitcoin wallet and 1 EVM wallet. The wallet being added must not have already been added as either a primary or an additional wallet.
To authorize a Bitcoin wallet for an existing EVM wallet, sign this EIP-712 message (any valid chain id can be used):
To authorize an EVM wallet for an existing Bitcoin wallet, sign this message:
The bitcoin signature should be created following the same rules as for authentication.
Coin Name
Field to sort by (Timestamp)
Timestamp
Possible values: Field to order (Asc, Desc)
Asc
Possible values: Filter by order side (Buy, Sell)
Buy
Possible values: OK
Order Id
123
BTC/ETH
Buy
100
123
0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0xca42DAA2D55AD9922507Cb62d69bCEF9328Cc8Ec
0
No content
USDC
1000
1
0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Created
0x0000000000000000000000000000000000000000
1337
bcrt1qdca3sam9mldju3ssryrrcmjvd8pgnw30ccaggx
2024-08-21T14:14:13.095Z
No content
Pool Id
0
0
100
0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x464547B3e2DB609A502A2175c7dEA16084dAB69F
0
BTC
OK
Pool Id
0
0
100
0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x464547B3e2DB609A502A2175c7dEA16084dAB69F
0
BTC
OK