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 a quote from the market maker for the base token
  • Example API Server

Was this helpful?

  1. Dfyn Exchange RFQ Module
  2. API Reference

Market Maker

Any market maker willing to register with Dfyn Exchange RFQ module, needs to expose an endpoint that has the following structure:

Get Quote

Get a quote from the market maker for the base token

GET https://api.marketmaker.com/v1/getQuote

This endpoint should return a calldata that includes the quote price and the signature. As a market maker, you need to call Dfyn's RFQ contract to fetch the nonce. Nonce has to be included in the signed data.

Note: The deadline should be in seconds.

Query Parameters

Name
Type
Description

token0*

String

token0 (base token) address

token1*

String

token1 (quote token) address

amount0*

String

token0 (base token) amount

chainId*

String

chain ID

user*

String

address of the user

{
    "data": {
        "message": "0xb8c67dde023728dba425a51f58fff315f77b6ab0ef407adba297659fc9607ecd",
        "messageHash": "0x9c824e2411f333c3b95daa07a30df99e0ce0ab65e39581a7521c80c1db2594f1",
        "v": "0x1c",
        "r": "0x217bb9c6040df7b0d8e453cd7f9b2ff7370cdaabc9773a2c97a218cc7bc280de",
        "s": "0x0449bc077ef2d2ac607b9430ac5460bd61abbe76777932461bdac6bd5b771ce7",
        "signature": "0x217bb9c6040df7b0d8e453cd7f9b2ff7370cdaabc9773a2c97a218cc7bc280de0449bc077ef2d2ac607b9430ac5460bd61abbe76777932461bdac6bd5b771ce71c",
        "messageObject": {
            "user": "0xD6F89B2b2c5386c2FFcA62da13B342e630cC4eC8",
            "marketMaker": "0xDF012A32BA54C30e89913E231011AA13f0cE3369",
            "token0": "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
            "token1": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
            "amount0": "1000000",
            "amount1": "994391", //token1 (quote token) amount
            "deadline": 1655450917,
            "nonce": "0"
        },
    }
}

Example API Server

PreviousAPI ReferenceNextTrader

Last updated 2 years ago

Was this helpful?

You can fork the following GitHub repo to create your own API server: . For access, please contact us on .

https://github.com/dfyn/rfq-api
Telegram