MetaPath API
  • API Introduction
    • General Instruction
    • Major Blockchain Name Conventions
  • Cross-platform Aggregator Interface
    • Token Swap Flow
    • Get <The Token List> Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • <BlackList> Interface
  • Upload gas free orders
  • Aggregate NFTs Interface V1.0
    • Get <Basic Information> Interface
    • Get <NFT List> Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • Get <NFT List Held by User> Interface
  • Aggregate NFTs Interface V2.0
    • Get <Latest Collections> Interface
    • Get <Top NFT Collections> Interface
    • <List Page> Interface
    • Get <NFT Details> Interface
    • Get <NFT Details> Other Related Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • <Batch Purchase> Interface
  • List Related Interface
    • Get <User's NFT> Interface
    • Get <Listed NFT List (My List)> Interface
    • <Create/Update Listing> Interface
    • <Create/Update Listing in the Backend> Interface
    • <Cancel Listing> Interface
    • <Change Listing> Interface
  • Swap Information Related Interface
    • <Add Swap Information> Interface
    • <Get Swap Information List> Interface
    • <Get Detailed Transation Infromation > Interface
Powered by GitBook
On this page
  • Interface Call Graph
  • Timing Diagram
  • remark

Upload gas free orders

Previous<BlackList> InterfaceNextAggregate NFTs Interface V1.0

Last updated 1 year ago

Interface Call Graph

Timing Diagram

remark

  • Call the "" to obtain the return value isSupportNoGas, where Y indicates support for gas free exchange

  • Call the "" and pass the isSupportNoGas field. If successful, the noGasTxInfo field will be returned as the call to be signed_ Data

  • For call_ Sign data to obtain signed data such as r, s, v, rawTransaction

  • Call the "", pass r, s, v, rawTransaction, and the orderId returned by the "Create Order Interface" to complete the process

Step 3 Example Code

 const privateKey = ''; // private key
 const transactionData = '{
  gasLimit: 100000,
  data: '0xaxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  chainId: 56,
  to: '0x0000000000000xxxxx',
  nonce: 50,
  gasPrice: '3150000000'
}'
 const account = web3.eth.accounts.privateKeyToAccount(privateKey);
 const signedTx = await account.signTransaction(transactionData);
 const r = signedTx.r;
 const s = signedTx.s;
 const v = signedTx.v;
 const rawTransaction = signedTx.rawTransaction;

1.Interface call:

https://www.swftc.info/gt/swap/v1/noGasSwap

2. Request parameter instance

parameter
whether
explain

orderId

Yes

eg:5d3b383f-5b58-4a35-87b6-2de8d23a492e

r

Yes

eg:0xxxxxxx

s

Yes

eg:0xxxxxxx

v

Yes

eg: 0xxx

rawTransaction

Yes

eg: 0xxxxxxx

3. Example of request parameters


{
    //orderId
    "orderId": "5d3b383f-xxxx-xxxx-xxxx-2de8d23a492e",
    "r": "0xxxx",
    "s": "0xxxxx",
    "v": "0xxx",
    "rawTransaction": "0xxxxxxxxx"
}

4.Example of returned results

{
    "orderId": "5d3b383f-xxxx-xxxx-xxxx-2de8d23a492e",
    "transactionHash": "0xxxxxxxxxxxxxx"
}

5.Return Parameter Description

field name
field
type
remark

orderId

orderId

String

orderId

tx hash

transactionHash

String

tx hash

Get Rate Interface
Create Order Interface
Upload gas free orders