Documentation - Dfyn
  • Vision & Mission
  • Glossary
  • The Dfyn Ecosystem
  • Features
  • Tokenomics
  • Token Utility
  • Current Status
  • Roadmap
  • Dfyn Exchange RFQ Module
    • Introduction
    • API Reference
      • Market Maker
      • Trader
    • Audits
  • Treasury
  • vDfyn Vault
    • Intro to the vDfyn Vault
    • vDfyn Vault FAQs
  • Build Your Own Farms (BYOF)
    • Intro to BYOF
    • How to use BYOF?
    • BYOF FAQs
  • Guides
    • Placing a Limit Order on Dfyn Exchange
    • Mapping ERC20 assets from Ethereum onto Matic
    • Adding liquidity to Dfyn AMM from Ethereum network
    • Changing Polygon's RPC Endpoint on MetaMask
    • How to farm $DFYN tokens on Dfyn Exchange
    • Using AscendEX (BitMax) to exit funds from Matic into Ethereum
    • Bringing funds from Ethereum to Matic using AscendEX (BitMax)
  • Prediction Markets (BETA)
    • Intro to Prediction Markets
    • Terminology
    • How to Participate in Prediction Markets
    • Prediction Markets FAQs
  • Technical
    • Contracts
    • Gasless Mode on Dfyn
    • How does Dfyn achieve gasless transactions?
    • Dfyn Analytics
    • Frequently Asked Questions
Powered by GitBook
On this page
  • Get Quote
  • Get the best quote for a trade

Was this helpful?

  1. Dfyn Exchange RFQ Module
  2. API Reference

Trader

Users and traders can use this API to fetch the best quote from all the integrated market makers.

Get Quote

Get the best quote for a trade

GET api.proxy.rfq.dfyn.network/api/getQuote

Returns the best quote from all the available market makers

Query Parameters

Name
Type
Description

user*

String

address of the user

token0*

String

token0 (base token) address

token1*

String

token1 (quote token) address

amount0*

String

token0 (base token) amount

chainId*

String

chain ID

nonce*

uint

nonce of the user (can be fetched from the RFQ contract)

{
    "data": {
        "message": "0x552ce952865663309de97567d906fd5a7d8c22ff66d5e4a39905c100f05426a9",
        "messageHash": "0xcd1e02e04cc62a04712c43a69fea0498fcd1c7259783e91a744f17239372edff",
        "v": "0x1b",
        "r": "0xca255446e47a610783b22850747ce663978ef1d56bb908301ab9167edeb14e2f",
        "s": "0x69de981f8bf06a158a8a7128302c536c5c7f74a33941b7cdd6921cb0d77c299f",
        "signature": "0xca255446e47a610783b22850747ce663978ef1d56bb908301ab9167edeb14e2f69de981f8bf06a158a8a7128302c536c5c7f74a33941b7cdd6921cb0d77c299f1b",
        "messageObject": {
            "user": "0x40d5250D1ce81fdD1F0E0FB4F471E57AA0c1FaD3",
            "custodian": "0x876cEA61f692F1624b6c8B1a8aC3d7A978A9f4fB",
            "token0": "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619",
            "token1": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
            "amount0": "1000000000000000",
            "amount1": "1699106",
            "deadline": "1660047049",
            "nonce": 0,
            "chainId": "137"
        },
        "swapFee": {
            "type": "BigNumber",
            "hex": "0x01"
        }
    }
}
{
    "data": null
}
PreviousMarket MakerNextAudits

Last updated 2 years ago

Was this helpful?