503 Service Unavailable when calling sandbox /withdrawals/crypto endpoint

I am experiencing odd behavior when calling the sandbox /withdrawals/crypto endpoint. I am getting a 503 even though I can see the withdrawal I submitted in the sandbox ui.

Here is the request with the 503 that actually succeeds:
POST https://api-public.sandbox.exchange.coinbase.com/withdrawals/crypto HTTP/1.1
Host: api-public.sandbox.exchange.coinbase.com
User-Agent: Coinbase.Pro/4.2.2 (Coinbase Pro API for .NET; GitHub - bchavez/Coinbase.Pro: A .NET/C# implementation of the Coinbase Pro API.)
CB-ACCESS-KEY: XXXXXXXXXXXXXXXXXXX
CB-ACCESS-SIGN: XXXXXXXXXXXXXXXXXXX
CB-ACCESS-TIMESTAMP: 1646146440
CB-ACCESS-PASSPHRASE: XXXXXXXXXXXXXXXXXXX
Content-Type: application/json; charset=UTF-8
Content-Length: 121

{“amount”:1234.56,“currency”:“BTC”,“crypto_address”:" XXXXXXXXXXXXXXXXXXX ",“add_network_fee_to_total”:true}

Here is the response:
HTTP/1.1 503 Service Unavailable
Date: Tue, 01 Mar 2022 14:54:02 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 32
Connection: keep-alive
Access-Control-Allow-Headers: Content-Type, Accept, cb-session, cb-fp, cb-form-factor
Access-Control-Allow-Methods: GET,POST,DELETE,PUT
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: cb-before, cb-after, cb-gdpr
Access-Control-Max-Age: 7200
Cache-Control: no-store
Etag: W/“20-+d4WkfvLmLfuwgjXUlqkyWpLKhk”
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Content-Type-Options: nosniff
X-Dns-Prefetch-Control: off
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
Server: cloudflare
CF-RAY: 6e52b9bf8d7e27ea-SEA

{“message”:“ServiceUnavailable”}

I have also attached a screen shot from Coinbase Pro | Digital Asset Exchange which show the transaction actually went through, even though I got a 503.

I can send a request with invalid data and I get a 400 which makes me think there is a down stream dependency that is having an issue.
Request with Invalid Amount:

POST https://api-public.sandbox.exchange.coinbase.com/withdrawals/crypto HTTP/1.1
Host: api-public.sandbox.exchange.coinbase.com
User-Agent: Coinbase.Pro/4.2.2 (Coinbase Pro API for .NET; GitHub - bchavez/Coinbase.Pro: A .NET/C# implementation of the Coinbase Pro API.)
CB-ACCESS-KEY: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
CB-ACCESS-SIGN: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
CB-ACCESS-TIMESTAMP: 1646146672
CB-ACCESS-PASSPHRASE: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
Content-Type: application/json; charset=UTF-8
Content-Length: 122

{“amount”:0.000001,“currency”:“BTC”,“crypto_address”:" XXXXXXXXXXXXXXXXXXXXXXXXXXXX ",“add_network_fee_to_total”:true}

Response for Invalid Amount:
HTTP/1.1 400 Bad Request
Date: Tue, 01 Mar 2022 14:57:54 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 42
Connection: keep-alive
Access-Control-Allow-Headers: Content-Type, Accept, cb-session, cb-fp, cb-form-factor
Access-Control-Allow-Methods: GET,POST,DELETE,PUT
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: cb-before, cb-after, cb-gdpr
Access-Control-Max-Age: 7200
Cache-Control: no-store
Etag: W/“2a-KMisXZJu6cMhCTm5N/yDkOQ0u9M”
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Content-Type-Options: nosniff
X-Dns-Prefetch-Control: off
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
CF-Cache-Status: DYNAMIC
Expect-CT: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
Server: cloudflare
CF-RAY: 6e52bf6a89be3a02-SEA

{“message”:“Minimum withdrawal is 0.0001”}

So it is unclear why I get a 400 which is a server response with invalid data, but with valid data I get a 503 Service Unavaliable, but the transaction actually succeeds.

@dd001 Please reference here -Withdraw to crypto address is disabled in Sandbox because the money and crypto is not real so you can transfer it on chain out of Coinbase. 503 just means we have the service turned off. Hope that helps!!

Ok, I can work around that. It was confusing to me that the withdrawal shows up in the UI, but the service returns a 503. I would expect the 503 to be caused by actual api being down, not a sub service that is being called by the API. Or if the 503 returned something additional to inform me that some other service was down. This does it make it difficult to integration test, and will cause me to have to mock the response from the api.

Thank you for the quick response.

I came across the same problem and wonder why there isn’t support for all the endpoints in the sandbox.
I’d really like to have the possibility to fully test an integration in a safe environment before hitting production.

Soo will that change in the future, or will it stay that way for now?

Thanks in advance

Hi @widdy - It will likely stay this way for now but I have passed along your concerns and will keep this group posted with any changes. Thanks!

1 Like