GDAX API - LabMazurokCom/Blockchain GitHub Wiki

Intro

Website: https://www.gdax.com/

Documentation: https://docs.gdax.com/

Limits: UNKNOWN.

Fee used in bot: 0.3% (taker fee for monthly volume less than 10M).

Order book

https://api.gdax.com/products/BTC-USD/book?level=2

By default, only the inside (i.e. best) bid and ask are returned. This is equivalent to a book depth of 1 level. If you would like to see a larger order book, specify the level query parameter.

If a level is not aggregated, then all of the orders at each price will be returned. Aggregated levels return only one size for each active price (as if there was only a single order for that size at the level).

Level Description
1 Only the best bid and ask
2 Top 50 bids and asks (aggregated)
3 Full order book (non aggregated)

Levels 1 and 2 are aggregated. The size field is the sum of the size of the orders at that price, and num-orders is the count of orders at that price; size should not be multiplied by num-orders.

Level 3 is non-aggregated and returns the entire order book.

  • Response for level 1:
{
    "sequence": "3",
    "bids": [
        [ price, size, num-orders ],
    ],
    "asks": [
        [ price, size, num-orders ],
    ]
}
  • Response for level 2:
{
    "sequence": "3",
    "bids": [
        [ price, size, num-orders ],
        [ "295.96", "4.39088265", 2 ],
        ...
    ],
    "asks": [
        [ price, size, num-orders ],
        [ "295.97", "25.23542881", 12 ],
        ...
    ]
}

Response for level 3:

{
    "sequence": "3",
    "bids": [
        [ price, size, order_id ],
        [ "295.96","0.05088265","3b0f1225-7f84-490b-a29f-0faef9de823a" ],
        ...
    ],
    "asks": [
        [ price, size, order_id ],
        [ "295.97","5.72036512","da863862-25f4-4868-ac41-005d11ab0a5f" ],
        ...
    ]
}

Ticker

Snapshot information about the last trade (tick), best bid/ask and 24h volume.

Response:

{
  "trade_id": 4729088,
  "price": "333.99",
  "size": "0.193",
  "bid": "333.98",
  "ask": "333.99",
  "volume": "5957.11914015",
  "time": "2015-11-14T20:46:03.511254Z"
}

Fees

Trading Rules

Trading rules: https://support.gdax.com/customer/portal/articles/2725970-trading-rules

1.5 A Trader may cancel an open Maker Order or Stop Order at any time before it is Filled. No fees are charged for canceled Orders.


1.6 A Limit Order is an Order to buy or sell a specified quantity of an Asset at a specified price.

1.7 A Limit Order will only ever Fill at the specified price or a better price.

1.8 A Limit Order with ‘post-only’ selected will only be posted to the Order Book if it would not be posted at the same price as an existing Order on the Order Book. A Limit Order with ‘post-only’ selected will always be a Maker Order.

1.9 A Limit Order without ‘post-only’ selected will be immediately posted to the Order Book (subject to any Time in Force Instructions) and can result in a Maker Order or a Taker Order, or an Order that is partially a Maker Order and partially a Taker Order.


1.10 A Market Order is an Order to buy or sell a specified quantity of an Asset at the best available price of existing Orders on the Order Book.

1.11 There is no guarantee that a Market Order will Fill at the price specified. A Market Order may Fill at a number of different prices, based on the quantity of the Market Order and the quantities of the existing Orders on the Order Book at the time.

1.12 Depending on the volume and prices of Orders on the Order Book at the time when a Market Order is posted, the Market Order may Fill at a price less favorable than the most recent trade price, in some cases significantly so. This is commonly referred to as ‘slippage’.

1.13 A valid Market Order will be immediately posted to the Order Book. A Market Order is always a Taker Order.


1.19 Stop Orders and Limit Orders may be placed with one of the following Time in Force Instructions.

  • Good til canceled: if posted, the Order will remain on the Order Book until canceled by the Trader. This is the default Time in Force Instruction.
  • Immediate or Cancel: the Order will only be posted to the Order Book to the extent that it would be immediately Filled; any remaining quantity is canceled. This results in a Taker Order.
  • Fill or Kill: the Order will only be posted to the Order Book if it would be immediately and completely Filled. This results in a Taker Order.

1.21 (Taker Order) If an Order is posted to the Order Book at the same price as one or more existing Orders, it is a Taker Order which will result in an immediate Fill at that price, to the extent of the total quantity of those existing Orders.

1.22 (Maker Order) To the extent that an Order is posted to the Order Book at a different price to all existing Orders, it is a Maker Order which will remain open at that price on the Order Book until:

  • It is canceled by the Trader;
  • It expires due to a Time in Force Instruction; or
  • It is completely Filled by one or more Taker Orders placed by another Trader at the same price.

1.31 GDAX charges a fee for each Taker Order that is posted to the Order Book. The fee is charged in the Quote Asset and is calculated as a percentage of the Order quantity.

1.32 The fee is charged by debiting the Trader’s Available Balance for the amount of the fee at the time that the Taker Order is posted.

1.33 There is no fee for Maker Orders.

1.34 If an Order is posted to the Order Book partially as a Maker Order and partially as a Taker Order, a fee applies to the extent it is posted as a Taker order.


1.45 - Updating Order Minimums and Maximums

GDAX will periodically update these Order Minimums and Order Maximums to reflect the current state of our marketplace and the notional value of the assets. We will provide Traders with 7 days notice via status.gdax.com prior to altering these values.


2.3 All Traders have equal access to the GDAX API and Web Interface. Coinbase does not provide prioritized access to any Trader.

2.4 GDAX Market Operations has the authority to take any action deemed appropriate to preserve market integrity. Such actions include, but are not limited to, the halting of trading, modifying risk-mitigating parameters, restricting Trader access to GDAX, restricting order types to post-only or limit only, canceling orders resting in the order book, or any other actions deemed to be in the best interest of the Exchange.


2.11 If two Orders of different quantities would result in self-execution, the smaller Order is canceled and the larger order is decremented by an amount equivalent to the smaller quantity. The remainder of the larger order remains Open.

Private API requests

ID verification is required