Getting Started

Email api@silvergoldbull.com with your existing customer ID in order to get an API key.
Your API key will have access to the same store as your account.
To enable the API in multiple countries and languages you can create an account in each store and then generate keys.
Advanced services like white labelling and wholesale pricing require volume commitments, please contact us.

This is a JSON REST API. It makes full use of response codes.
It is recommended to use a content type header of text/json when posting a JSON body.
created_at fields are always UTC.

Just like on our website, orders are binding once placed and guaranteed by your own account.
You are making a promise to pay and honor your order commitment.
We immediately hedge your order and will lock your order price no matter what happens.

Authentication

Authentication and identification to the Silver Gold Bull API is done by providing an API key in the X-API-KEY header on every request.
The API requires that all communication is secured using HTTPS/TLS.

All keys are live.
Declarations can be made if you want to test order placement.

Remember to treat your API Keys as passwords and keep them secret.
They should not be included in public repositories, client side code, etc.

Rate Limiting

60 requests may be made per 60 second period.

Errors

In the event of a client or server error, the response will contain the standard 4xx or 5xx respectively,
accompanied by a well-formed JSON body describing the issue, e.g., a required field was omitted.

Error Object

attribute

type

specification

message

string

Human readable description of the problem

Common HTTP Status Codes

code

name

description

200

OK

The request was successful

201

Created

The request was successful and one or more resources was created

400

Bad Request

Request not processed due to client error

401

Unauthorized

Authentication is required and has failed

404

Not Found

The requested resource could not be found

405

Method Not Allowed

A request method is not supported for the requested resource; for example, a GET request on a form which requires data to be presented via POST

421

Misdirected Request

The request was made to the wrong server

422

Unprocessable Entity

The request was well-formed but unable to process the contained instructions

Quote Order

POST /orders/quote

Obtain a live market quote for a new order. If the response is 200 OK then it is valid and the same data can likely be submitted as an order. To guarantee your order being at or below your price, use bid_price. If using bid_price then understand that a successful quote one moment may not submit as an order the next due to market price movements. With or without bid_price you will always get our best price.

input param

type

example

info

billing and shipping.company

text

Silver Gold Bull

Optional

billing and shipping.street

text

888 - 3 ST SW

Required

billing and shipping.first_name

text

John

Required

billing and shipping.last_name

text

Smith

Required

billing and shipping.city

text

Calgary

Required

billing and shipping.region

ISO 3166-2

AB

Required for some countries

billing and shipping.postcode

text

T2P 5C5

Required for some countries

billing and shipping.country

ISO 3166-1 alpha-2

CA

Required

declaration

text

TEST

Required to be either TEST or PROMISE_TO_PAY

shipping_method

text

1YR_STORAGE

Required - use id from /shipping/method

payment_method

text

paypal

Required - use id from /payments/method

currency

ISO 4217

CAD

Required - use id from /currencies

items.id

text

2544

Required - use id from /products

items.qty

integer

12

Required

items.bid_price

decimal

34.92

Optional - only execute if market price is at or below this value in currency

Response

Status: 422 Unprocessable EntityContent-type: application/json

{
"message" : "product `id 2706` is unavailable"
}

Create Order

POST /orders/create

Create and commit your order. Optionally bid on products so that you only buy them if the price is at or below your price limit. Order is confirmed and binding when the response code is 201 Created and the response JSON includes created_at and the new order id. The order confirmation will be emailed.

input param

type

example

info

billing and shipping.company

text

Silver Gold Bull

Optional

billing and shipping.street

text

888 - 3 ST SW

Required

billing and shipping.first_name

text

John

Required

billing and shipping.last_name

text

Smith

Required

billing and shipping.city

text

Calgary

Required

billing and shipping.region

ISO 3166-2

AB

Required for some countries

billing and shipping.postcode

text

T2P 5C5

Required for some countries

billing and shipping.country

ISO 3166-1 alpha-2

CA

Required

declaration

text

TEST

Required to be either TEST or PROMISE_TO_PAY

shipping_method

text

1YR_STORAGE

Required - use id from /shipping/method

payment_method

text

paypal

Required - use id from /payments/method

currency

ISO 4217

CAD

Required - use id from /currencies

items.id

text

2544

Required - use id from /products

items.qty

integer

12

Required

items.bid_price

decimal

34.92

Optional - only execute if market price is at or below this value in currency