GET
/
marketdata
/
trades
Get trades data (also known as time and sales)
curl --request GET \
  --url https://openapi.ainvest.com/open/marketdata/trades \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "data": [
      {
        "t": 123,
        "p": 123,
        "q": 123
      }
    ]
  },
  "status_code": 123,
  "status_msg": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your key. Get the key here

Query Parameters

ticker
string
required

US stock market ticker symbol, e.g. AAPL, TSLA, etc.

count
number
required

The number of trades to return

to
integer
required

End of the requested period, unix timestamp with milliseconds

Response

200
application/json

Successful response in standard envelope.

The response is of type object.