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>"
}
Currently only returns data for current trading day. Access to historical tick data is not implemented yet

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

Successful response in standard envelope.

data
object
status_code
number

Status code, 0 for success

status_msg
string

Status message, success for success