Coinbase Pro | Place Orders

In order to place new orders in Coinbase, you first need your API keys to access your private data. Check the following article: How to Use Private REST API.

 

Once you have configured your API keys, you can start to place orders

Market Order

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


TsgcWSAPI_Coinbase oCoinbase = new TsgcWSAPI_Coinbase();
oCoinbase.Coinbase.ApiKey = "your api key";
oCoinbase.Coinbase.ApiSecret = "your api secret";
oCoinbase.Coinbase.ApiPassphrase = "your passphrase";
MessageBox.Show(oCoinbase.REST_API.PlaceMarketOrder(coisBuy, "BTC-USD", 0.002, 0));

Limit Order

Place a new Limit Order, buy 0.002 contracts of BTC-USD at price limit of 10000


TsgcWSAPI_Coinbase oCoinbase = new TsgcWSAPI_Coinbase();
oCoinbase.Coinbase.ApiKey = "your api key";
oCoinbase.Coinbase.ApiSecret = "your api secret";
oCoinbase.Coinbase.ApiPassphrase = "your passphrase";
MessageBox.Show(oCoinbase.REST_API.PlaceLimitOrder(coisBuy, "BTC-USD", 0.002, 0, 10000));