transactionOut

Get a transaction to retrieve tokens from one address to another with specified slippage and quote ID.

Request Parameters:

NameTypeDescriptionExample

quoteId (required)

String

The ID of the quote used for the token swap

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

toAddress (required)

String

The address to receive the swapped tokens

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

Request URL Example:

https://api.magpiefi.xyz/aggregator/transaction-out?quoteId=c6625f82-19a7-4943-9eb7-9dd4b0a7d39f&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