Hi, the sample works perfect for GET methods with no body but for POST methods with body it is throwing ‘invalid signature’ error
I am adding body like below:
var body = JSON.stringify({
price: ‘1.0’,
size: ‘1.0’,
side: ‘buy’,
product_id: ‘BTC-USD’
});
I don’t understand where I am doing wrong.
I just signed up to this forum and there is NO button to create a new thread. I am forced to hijack this thread and ask how I am supposed to create new threads/topics? Do I need to request special permission to post a new topic or is the UI truly that horrendous that I can’t find a button to do so?
It takes some time as your user account starts off with no permissions, but after reading the blog posts and becoming a basic user, you can write threads. I too had the same problem. In the badges it tells you what is needed to become a basic user.
Take it easy
Thanks for clearing this up, @SubStandard! There are not that many threads on this forum, so I am not sure how long I need to look at them before I am granted permissions to create my own threads.
The link you provided https://public.sandbox.pro.coinbase.com/ is the one I used. I did have to sign in with Coinbase Logins information (which if you have a coinbase Pro account it should be the same login information) after logging in the User interface looks like your coinbase pro interface but it says Sandbox in the URL. Obtaining the API Key, Secret and Pass Phrase by clicking on your name in the upper right and selecting API. Now if only I could figure out this CB-signature stuff in python I could play with pretend currencies in the SandBox…
Hi Larry
I would like to get the Python example as well. I am trying to make API call in Coinbase Exchange but getting issues making the signature. It would be great if we could get a sample code in Python to generate the signature.
Thanks
So I deleted that last post because of a stupid error on my part with a swapped variable in my signature function. I’ve got full function on the pro api now. However I’m not sure if I’m ready to start making actual trades. I am ready to sandbox my algorithm. But when I change my credentials over to the sandbox api keys and urls I get this mess
Hi @SwissGeorge - Welcome to our Forum! Unfortunately, we cannot provide hashed examples of signatures on this forum. Hoping the sample code here will suffice. Thanks!
I am currently working in the Coinbase Pro API sandbox. When trying to complete my orders, i get the error that the product_id is not valid. However, this does not apply for the product_id “BTC-EUR”. All others dont work. Is the Sandbox version limited to only Bitcoin and are all other currencies blocked?
Thank you!
Coinbase limits access to certain trading pairs based on the users location. Are you saying that you get that error for all other 400+ trading pairs or at least the ones you tried but NOT for BTC-EUR only? I have not read anywhere that the sandbox only allows testing of BTC pairs.
I can retrieve the data for all trading pairs (Websocket) but when placing the market order i receive the following message “product_id is not a valid product”.
To note, I am not located in the US.
For instance, the following code gives me the product_id error:
url = “https://api-public.sandbox.exchange.coinbase.com”
client = cbpro.AuthenticatedClient(coinbase_API_key, coinbase_API_secret, passphrase, url)
client.place_market_order(product_id = “ETH-EUR”,
side = “buy”,
size = 0.01,
overdraft_enabled = False))
I have tried sending orders for trading pairs such as ETH-EUR but they did not go through, only BTC-EUR worked. To note, I am not in the US. I can retrieve the data for ETH-EUR via the Websocket but cannot place the order
A lot of functionality is absent in the sandbox. I couldn’t make trades there. While testing my code i was trying BTC-USD. The order would execute and then cancel itself. A week or so ago it was working fine, not sure what happened but my code works fine on the live server.
Hi All! and welcome @BVermeulen ! Loving the conversation and feedback - thank you! To follow up, yes, Sandbox is limited - only a few currency pairs as you’ve pointed out. BTC books are the healthiest and we have to fix the Order books manually because of crazy limit orders put on the book. Then Price Protection cancel orders automatically.