By Admin on Tuesday, 02 March 2021
Category: All

Coinbase Pro REST API

​From sgcWebSockets 4.4.8, Coinbase Pro REST API is fully supported. The REST API allows to access to public Market Data and Private Accounts, place new orders... sgcWebSockets library supports the following endpoints

Authentication, Accounts, Orders,  Fills, Limits, Deposits, Withdrawals, Stablecoin Conversions, Payment Methods, Coinbase Accounts, Fees, Reports, Profiles, Margin, Oracle

Coinbase Pro Public REST API 

Coinbase Pro offers public Market Data through REST Endpoints, when you call one of these endpoints, you will get an snapshot of the market data requested.

The Market Data Endpoints doesn't require authentication, so are freely available to all users.

Example: to get an snapshot of the ticker BTC-USD, do the following call

Coinbase Pro Private REST API 

The Coinbase Pro REST API offer public and private endpoints. The Private endpoints requires that messages signed to increase the security of transactions.

First you must login to your Coinbase Pro account and create a new API, you will get the following values:

These fields must be configured in the Coinbase property of the Coinbase API client component.

Once configured, you can start to do private requests to the Coinbase Pro REST API

Coinbase Pro Place Orders 

In order to place new orders in Coinbase Pro, you require first your APIs to access your private data. Once you have configured your API keys, you can start to place orders

Example: Place a new Market Order, buy 0.002 contracts of BTC-USD

Coinbase Pro SandBox Account 

Coinbase Pro allows to use a SandBox account where you can trade without real funds. This account requires to create API keys different from production account.

To use the SandBox account, just set Coinbase.SandBox property to true, before do any request to API.

SandBox Trading with Coinbase Pro API 

 In the following video you can see how place new orders using REST API and how you get real-time updates using websocket user channel.

This browser does not support the video element.

Related Posts