Get started

Step 0: Get 31Third API key

Request an API key via [email protected]envelope.

Step 1: Get an indicative price

Use /swap/price to fetch an indicative price.

pricechevron-right

You'll receive indicative information about:

  • buy amount

  • conversion price

  • price impact estimation.

Step 2: Get quote

Use /swap/quote to fetch a quote.

quotechevron-right

You'll receive information about:

  • buy amount

  • minimal buy amount

  • conversion price

  • guaranteed conversion price

  • price impact

  • maximal price impact

  • raw transaction

Step 3: Send transaction

The quote response contains a raw transaction.

This transaction can be broadcasted to execute the swap.

Ethers.js example

The raw transaction can be passed into ethers signer.sendTransactionarrow-up-right as follows:

Last updated