Exchange
API Best
Practices
March 2022
1
Exchange API
Best Practices
Coinbase Exchange helps a wide variety of institutional clients access one of the deepest pools of
liquidity of any regulated crypto spot exchange through high throughput APIs and an advanced
trading interface. This document describes a few of our recommended best practices for our APIs.
Connectivity and redeployments
We run our infrastructure out of US-EAST-1 (AWS). For optimal connectivity, we recommend
you do as well.
There are typically two FIX redeployments per week (Monday and Thursday @ 2PM EST) that
will force disconnect users. Note: We do not deploy on holidays.
These redeployments do not impact FIX users that have setup tag 8013
(CancelOrdersOnDisconnect)
Optimized set up for FIX
15 profiles maximum
7 sessions per profile
50 requests per rolling second per session
R olling second: the clock starts when the first command is sent. We use a la y-fill z
token bucket implementation. More details can be found here.
Order book auctions
New books are now launched with Auction mode unless otherwise specifie d
;
d
Enter limit orders to participate in a book currently in Auction during Auction, no matches will
occur, but once the auction is completed, crossed orders will be fille
Note that orders with “ post only ” fl j
ag will be re ected as all orders that cross upon
completion of the auction are treated as taker order s
We recommend keeping track of the “ _
auction mode ” fl
ag within the status channel and the
/products endpoint to note when a book is currently in Auction mod e
For more information please contact: sales@coinbase.com
Order book auctions (continued)
We recommend you use the latest indicative price and best bid/asks disseminated
{
periodically on the auction channel or through the L1 /products/ product _id}/book endpoint
to adjust your orders during the auction.
Batch messaging
We strongly recommend using batch messages for both order entry and cancellation.
Up to 10 orders/cancels can be batched into one request
Batch requests only count as one request for the purposes of rate limiting
Batch requests are more efficient to process compared to the equivalent individual requests
Cancel on disconnect - we support both cancel by session and cancel all by profile. Cancelling
all by profile is more efficient than cancelling by session.
Drop copy can be enabled on any session
Order modifiers - see here.
Cancel on disconnect
Self Trade Prevention Policy
Good-till-time
Websocket API feeds
All supported channels are described here.
Heartbeat
Status
Ticker
Level2
Matches
Full
User - requires authentication
Websocket API best practices
Subscribing to one channel per connection is recommended over subscribing to hundreds of
channels over one connection.
We recommend authenticating with every connection (even if not required).
For more information please contact: sales@coinbase.com