transactionIn

Get a transaction for swapping tokens from one network to another with specified slippage tolerance.

Request Parameters:

NameTypeDescriptionExample

quoteId (required)

String

The ID of the quote to use for the transaction

227b64c2-c002-4696-9d84-8fb965f7f915

toAddress (required)

String

The address to swap tokens to

0x3G9b800bB6805239E9F9C5027F894917C7a71e41

fromAddress (required)

String

The sender address for the transaction

0x3G9b800bB6805239E9F9C5027F894917C7a71e41

estimateGas (optional)

Boolean

Flag to determine if gas should be estimated

Default Value: True

Response URL Example:

https://api.magpiefi.xyz/aggregator/transaction-in?quoteId=798b3fff-5740-4028-8e94-3c11c562945b&toAddress=0x710Ba8dc63290640f14F0f823faD0Fa49B91C5Ab&fromAddress=0x710Ba8dc63290640f14F0f823faD0Fa49B91C5Ab&estimateGas=true

Response Example:

{
  "from": "string",
  "to": "string",
  "data": "string",
  "chainId": 0,
  "type": 0,
  "gasLimit": "string",
  "maxFeePerGas": "string",
  "maxPriorityFeePerGas": "string",
  "gasPrice": "string",
  "value": "string"
}

Last updated