REST API

Rest API End Points

Overview

Chain
Base Url

Arbitrum Goerli (421613)

https://test.orderbook.premia.finance

Arbitrum One (42161)

https://orderbook.premia.finance

Publish Quotes

To submit a quote to the orderbook, POST quotes can be used. In the background, we will take this quote an submit an event on Arbitrum Nova on the users behalf. One the quote event is generated on Arbitrum Nova, it will be added to the orderbook.

Publishes the quote into the orderbook

post
Required scopes
This endpoint requires the following scopes:
Authorizations
x-apikeystringRequired
Bodyobject[]
chainIdstringRequiredPattern: ^42161$|^421613$
providerstringRequiredPattern: ^0x[a-fA-F0-9]{40}$
takerstringRequiredPattern: ^0x[a-fA-F0-9]{40}$
pricestringRequired
sizestringRequired
isBuybooleanRequired
deadlineintegerRequired
saltintegerRequired
Responses
200

Quote exists

application/json
post
/quotes

Get Quotes

When using GET quotes, orders are returned based on the params details provided. quotes endpoint is ideal for determining which order(s) will satisfy a specific order size and side. The returned quotes are ordered by price, and only the order(s) that satisfy the size (cumulatively) will be returned.

Additionally, it is possible to receive RFQ quotes along with public quotes by specifying a taker address. The allows users to find the best possible public/private quote combination for a particular quote size.

Get best quotes to fill the order parametrised by query params

get
Required scopes
This endpoint requires the following scopes:
Authorizations
x-apikeystringRequired
Query parameters
poolAddressstringRequired

unique address of the pool

Pattern: ^0x[a-fA-F0-9]{40}$
sizestringRequired

fill size (1 contract = 1e18)

Pattern: ^[0-9]*$
sidestringRequired

orderbook side ("ask" or "bid")

Pattern: ^bid$|^ask$
chainIdstringRequired

chain id ("42161" or "421613")

Pattern: ^42161$|^421613$
providerstringOptional

unique address of the provider

Pattern: ^0x[a-fA-F0-9]{40}$
takerstringOptional

unique address of the taker (for rfq quotes)

Pattern: ^0x[a-fA-F0-9]{40}$
Responses
200

Successful operation

application/json
get
/quotes

Get rfq_quotes

When publishing an RFQ, users can listen for quotes via WEBSOCKET or use the rfq_quotes endpoint to retrieve only RFQ quotes via REST API.

Get private quotes assigned to user (taker) address

get
Required scopes
This endpoint requires the following scopes:
Authorizations
x-apikeystringRequired
Query parameters
poolAddressstringRequired

unique address of the pool

Pattern: ^0x[a-fA-F0-9]{40}$
sidestringRequired

orderbook side ("ask" or "bid")

Pattern: ^bid$|^ask$
chainIdstringRequired

chain id ("42161" or "421613")

Pattern: ^42161$|^421613$
takerstringRequired

taker address

Pattern: ^0x[a-fA-F0-9]{40}$
Responses
200

Successful operation

application/json
get
/rfq_quotes

Get Orders

GET orders is a general purpose query of orders in the orderbook. Many of the params are optional to suit the needs of the query. Orders are returned in descending order based on the timestamp in which they were created.

Get all quotes available using query params

get
Required scopes
This endpoint requires the following scopes:
Authorizations
x-apikeystringRequired
Query parameters
poolAddressstringOptional

unique address of the pool

Pattern: ^0x[a-fA-F0-9]{40}$
sizestringOptional

min order size of each order (1 contract = 1e18)

Pattern: ^[0-9]*$
sidestringOptional

orderbook side ("ask" or "bid")

Pattern: ^bid$|^ask$
chainIdstringRequired

chain id ("42161" or "421613")

Pattern: ^42161$|^421613$
providerstringOptional

unique address of the provider

Pattern: ^0x[a-fA-F0-9]{40}$
Responses
200

Successful operation

application/json
get
/orders

Last updated

Was this helpful?