GET /trade/v1/{chainId}/quote/cross 1

Parameters

This is the list of important params for BTC trade

NameDescription

fromTokenAddress*

Zero address, as we only support trade from native Bitcoin to Ethereum on the Ethereum mainnet or Avax on the Avax network. Example: 0x0000000000000000000000000000000000000000

toTokenAddress*

Zero address, as we only support trade from native Bitcoin to Ethereum on the Ethereum mainnet or Avax on the Avax network. Example: 0x0000000000000000000000000000000000000000

amount*

Amount of tokens being traded. Example: 1 BTC → 100000000, 1 ETH → 1000000000000000000

destinationChainId*

The chain ID of the destination network. Available values: 1, 43114, -3980891822

sender*

The address of the sender. If trading from BTC to EVM, the sender is your BTC address. If trading from EVM to BTC, the sender is your EVM address. Example: 0x54c47034887C582Fc1Af4a9a3b68180a8a9eF2d2

receiver*

The address of the receiver. If trading from BTC to EVM, the receiver is your EVM address. If trading from EVM to BTC, the receiver is your BTC address. Example: bc1qf7cd6pvs9sqnkr0nadsuhgecy8prnc9t8k0jny

isExactOut

For BTC trade, we don't support exact out trade. isExactOut is false for this trade

chainId*

The chain ID of the chain to quote on. Available values: 1, 43114, -3980891822

Response

200: OK The response is an array of objects. Currently, we only support Thorchain for native BTC trade, so this array will have only one item for Thorchain.

[
    {
        "srcTradeList": [],
        "dstTradeList": [],
        "srcTrade": {
            "protocol": {
                "name": "Thorchain",
                "logo": "<https://thorchain.org/images/logos/full-dark.png>",
                "website": "<https://thorchain.org/>",
                "docsLink": "<https://thorchain.org/integrate>",
                "description": "THORChain is a network that facilitates native asset settlement between Bitcoin, Ethereum, BNB Chain, Avalanche, Cosmos Hub, Dogecoin, Bitcoin Cash & Litecoin"
            }
        },
        "dstTrade": {
            "toTokenAmount": "18478666090000000000",
            "deltaAmount": "18478666090000000000",
            "protocol": {
                "name": "Thorchain",
                "logo": "<https://thorchain.org/images/logos/full-dark.png>",
                "website": "<https://thorchain.org/>",
                "docsLink": "<https://thorchain.org/integrate>",
                "description": "THORChain is a network that facilitates native asset settlement between Bitcoin, Ethereum, BNB Chain, Avalanche, Cosmos Hub, Dogecoin, Bitcoin Cash & Litecoin"
            }
        },
        "transactionData": {
            "dust_threshold": "10000",
            "expected_amount_out": "1847866609",
            "expected_amount_out_streaming": "",
            "expiry": 1706758452,
            "fees": {
                "affiliate": "4652412",
                "asset": "ETH.ETH",
                "liquidity": "4040448",
                "outbound": "360000",
                "slippage_bps": 21,
                "total": "9052860",
                "total_bps": 48
            },
            "inbound_address": "bc1qkttu0a6gljrrswzyw3rwp59sunjep7zfqgyvr9",
            "inbound_confirmation_blocks": 1,
            "inbound_confirmation_seconds": 600,
            "max_streaming_quantity": 0,
            "memo": "=:ETH.ETH:0x207ca4370639120f9A049aF9CAB4fCaa608F2445::zcx-com:25",
            "notes": "First output should be to inbound_address, second output should be change back to self, third output should be OP_RETURN, limited to 80 bytes. Do not send below the dust threshold. Do not use exotic spend scripts, locks or address formats (P2WSH with Bech32 address format preferred).",
            "outbound_delay_blocks": 103,
            "outbound_delay_seconds": 618,
            "recommended_min_amount_in": "222000",
            "slippage_bps": 21,
            "streaming_slippage_bps": 21,
            "streaming_swap_blocks": 0,
            "total_swap_seconds": 1218,
            "warning": "Do not cache this response. Do not send funds after the expiry.",
            "amount": "100000000",
            "tradeType": "BTC_TO_NATIVE",
            "tradeProtocol": "CROSS_CHAIN_THORCHAIN"
        },
        "nativeValue": "100000000",
        "nativeValueFee": "0",
        "tradeProtocol": "CROSS_CHAIN_THORCHAIN",
        "sourceChainId": -3980891822,
        "destinationChainId": 1
    }
]

Last updated