Market Data

List Trades

<div class="p-4 text-sm section-icon section-info rounded-sm" role="alert"> <div class="flex"> <svg view-box="0 0 24 24" > <path fill-rule="evenodd" clip-rule="evenodd" d="M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM11 17V11H13V17H11ZM11 9V7H13V9H11Z" /> </svg> This public API endpoint is limited to retrieving seven calendar days of data. </div> <span> Please contact us <a href="https://gemini24.zendesk.com/hc/en-us/requests/new" target="_blank">through this form</a> for information about Gemini market data. </span> </div>

This will return the trades that have executed since the specified timestamp. Timestamps are either seconds or milliseconds since the epoch (1970-01-01). See the Data Types section about timestamp for information on this.

Each request will show at most 500 records.

If no since or timestamp is specified, then it will show the most recent trades; otherwise, it will show the most recent trades that occurred after that timestamp.

get/v1/trades/{symbol}

Request

  • Base URL
    https://api.gemini.com
  • URL
    https://api.gemini.com/v1/trades/{symbol}
  • Auth
    none declared

Path parameters

symbolstring required

Trading pair symbol <br /> <br />

BTCUSD, etc. See <u>symbols and minimums</u>.

Query parameters

string

Gemini strongly recommends using milliseconds instead of seconds for timestamps.

Timestamp formatExampleSupported request type
string (seconds)1495127793POST only
string (milliseconds)1495127793000POST only
OR
integer

Gemini strongly recommends using milliseconds instead of seconds for timestamps.

Timestamp formatExampleSupported request type
whole number (seconds)1495127793GET, POST
whole number (milliseconds)1495127793000GET, POST
Example:1495127793000

Only return trades after this timestamp. See <u>Timestamps</u> for more information. If not present, will show the most recent trades. For backwards compatibility, you may also use the alias since. With timestamp, there is a 90-day hard limit.

since_tidnumber

Only retuns trades that executed after this tid. since_tid trumps timestamp parameter which has no effect if provided too. You may set since_tid to zero to get the earliest available trade history data.

limit_tradesnumber

The maximum number of trades to return. The default is 50.

include_breaksboolean

Whether to display broken trades. False by default. Can be 1 or true to activate

Response

The response will be an array of JSON objects, sorted by timestamp, with the newest trade shown first.

tidinteger

The trade ID number

pricestring decimal

The price the trade was executed at

amountstring decimal

The amount that was traded

exchangestring

Will always be "gemini"

type'buy' | 'sell'
  • buy means that an ask was removed from the book by an incoming buy order.
  • sell means that a bid was removed from the book by an incoming sell order.
brokenboolean

Whether the trade was broken or not. Broken trades will not be displayed by default; use the include_breaks to display them.

Example response

[
  {
    "timestamp": "1495127793000",
    "timestampms": "1495127793000",
    "tid": 5335307668,
    "price": "3610.85",
    "amount": "0.27413495",
    "exchange": "gemini",
    "type": "buy"
  }
]

Changes

No recorded changes to this operation across all 1 revision of this API.