Sending the Quote

Quote messages should be sent on the same WebSocket connection that received the RFQ. The rfqTQuote message should be sent within 750ms of receiving the rfqT message.

The quote messages are of the following type:

{
  "messageType": "rfqTQuote",
  "message": {
  "protocols": ["pool"],
    "data": {
      "rfqId": string;
      "source": string;
      "nonce": number;
      "quoteExpiry": number;
      "baseToken": string;
      "quoteToken": string;
      "trader": string;
      "poolAddress": string;
      "effectiveTrader": string;
      "baseTokenAmount": number;
      "quoteTokenAmount": number;
      "externalAccount": number;
      "baseChain": { 
         "chainType": string; // 'evm'
	 "chainId": number; 
      };
      "quoteChain": { 
        "chainType": string;  // 'evm'
	"chainId": number; 
      };
      "feesBps": number;
      "signatures": [poolsignature];
    },
  },
}

In short, the maker picks a liquidity source (pool), fills in the missing amount as described in the sections above, and signs the quote.

Every trade happens through a UpshotPool contract (populated in the pool field). The pool contract can store the funds used for market making.

The signature field proves to the UpshotPool smart contract that the information provided is correct. It should be provided using the Private Key of the signer used to deploy the pool.

You can see the code example

Last updated