WEBSOCKET
Websocket Functionality
Last updated
Was this helpful?
Websocket Functionality
Last updated
Was this helpful?
Arbitrum Goerli (421613)
wss://test.quotes.premia.finance
Arbitrum One (42161)
wss://quotes.premia.finance
Using the WEBSOCKET connection, it is possible to:
public/RFQ quotes from the orderbook in realtime
an RFQ requests (for market takers) to receive personalized quotes
RFQ requests (for market makers) to subsequently provide personalize quotes
Upon connection with the Websocket server, users must send an AUTH
message with an api key. If this step is not done, any requests to Stream quotes or Publish RFQ requests will be denied.
As a market maker who would like to provide quotes to users who want to utilize RFQ, it will require subscribing to requests to be alerted when a request is made. In order to respond to an RFQ, market maker must publish quotes (via rest api), with the takerAddress
populated with the requesters address, otherwise the quote is fillable by any party and will likely be missed by the requester who is listening for quotes with their address populated in the takerAddress
field of a quote.
Subscribing to quotes allows a user to stream real time quotes that are published to the orderbook along with any private quotes that may also be available from an . By default, ALL public quotes are subscribed to upon authorization of a websocket connection. FILTER
messages are required.
If the desire is to send an RFQ request to receive personalized quotes, it must be done by sending an RFQ
message type. Please note that in order to RECEIVE these personalized quotes via websocket, the FILTER
message when subscribing to quotes must include the taker
address. Alternatively, it is possible to use the get REST API endpoint.