Buy tokens

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
orderIds
array of strings
orderIds
rawOrders
array of objects
rawOrders
tokens
array of strings

Array of tokens user is buying. Example: tokens[0]: 0x8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63:704 tokens[1]: 0x8d04a8c79ceb0889bdd12acdf3fa9d207ed3ff63:979

tokens
integer

Quantity of tokens user is buying. Only compatible when buying a single ERC1155 token. Example: 5

string
required
^0x[a-fA-F0-9]{40}$

Address of wallet filling the order. Example: 0xF296178d553C8Ec21A2fBD2c5dDa8CA9ac905A00

string
^0x[a-fA-F0-9]{40}$

Address of wallet relaying the filling transaction

boolean
Defaults to false

If true, only the path will be returned.

boolean

If true, all fills will be executed through the router.

string
enum

Currency to buy all listings in.

Allowed:
boolean
Defaults to false
string
^[a-zA-Z0-9.-]+\.[a-zA-Z0-9]{2,}$|localhost

If there are multiple listings with equal best price, prefer this source over others.
NOTE: if you want to fill a listing that is not the best priced, you need to pass a specific order ID.

string
^[a-zA-Z0-9.-]+\.[a-zA-Z0-9]{2,}$|localhost

Filling source used for attribution. Example: reservoir.market

feesOnTop
array of strings

List of fees (formatted as feeRecipient:feeAmount) to be taken when filling.
Unless overridden via the currency param, the currency used for any fees on top matches the buy-in currency detected by the backend.
Example: 0xF296178d553C8Ec21A2fBD2c5dDa8CA9ac905A00:1000000000000000

feesOnTop
boolean
Defaults to false

If true, any off-chain or on-chain errors will be skipped.

string
^[0-9]+$

Optional. Set custom gas price.

string
^[0-9]+$

Optional. Set custom gas price.

boolean
Defaults to false

If true, balance check will be skipped.

boolean
Defaults to false

If true, do not filter out inactive orders (only relevant for order id filtering).

boolean
Defaults to false

Exclude orders that can only be filled by EOAs, to support filling with smart contracts.

string

Override the X2Y2 API key used for filling.

Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
*/*