m.crypto.last_trade¶
The latest trade of each crypto pair.
Call it from a session m, made with dm.MassiveSession():
m.crypto.last_trade(symbols, *, on_error=None)
- Methods:
fetch(),poll(interval) - Read from: REST
poll()by default:dm.PollMode.REPLACE, which holds only the latest poll's rows, one row perSymbolpoll(interval, mode=dm.PollMode.APPEND): appends each new state of a row, identified bySymbolandTimestamp
Arguments¶
A linked argument follows its rule under shared arguments on the dataset index.
| Argument | Description |
|---|---|
symbols |
Crypto pairs, such as X:BTCUSD. dm.ALL is refused; for every pair, use m.crypto.snapshots(dm.ALL). |
on_error |
What a bad symbol or row does in this call (dm.ErrorPolicy). None, the default, takes each cause from the session's MassiveConfig.on_error. |
Plans¶
How recent the data is on each of Massive's plans, and how far back its history goes, as Massive's pages state them.
| Plan | Last Trade (REST) |
|---|---|
| Currencies Basic | Not included |
| Currencies Starter | Real-time |
| Currencies Business | Real-time |
Columns¶
| Column | Type | Description |
|---|---|---|
Symbol |
String | The row's instrument, as Massive's ticker. From REST: the request's from parameter. |
Date |
String | The trading day of the row, as ISO yyyy-MM-dd text: the UTC date of Timestamp. |
Timestamp |
Instant | The row's event time. From REST timestamp: "The Unix millisecond timestamp." |
Price |
double | The price of the trade: the amount of the pair's second currency paid for one unit of its first (US dollars per bitcoin for X:BTCUSD). |
Size |
double | The size of a trade (also known as volume). |
Conditions |
long[] | A list of condition codes. See Crypto Condition Codes (https://massive.com/docs/rest/crypto/market-operations/condition-codes) for what each code means. |
Exchange |
long | The exchange that this crypto trade happened on. See Exchanges (https://massive.com/docs/rest/crypto/market-operations/exchanges) for a mapping of exchanges to IDs. |
TimestampInsert |
Instant | When the library received the row, by the local clock. Rows that arrive together share it. It isn't Massive's time, and later rows can carry earlier times. In a poll() table, it's the time of the poll the row's values came from. |
Massive fields
The Massive field behind each column, by source. An empty cell means the source doesn't carry the column, or the library computes it. request marks a value the library fills from the request.
| Column | REST field |
|---|---|
Symbol |
request |
Date |
|
Timestamp |
timestamp |
Price |
price |
Size |
size |
Conditions |
conditions |
Exchange |
exchange |
TimestampInsert |
Massive's documentation¶
The plan tables and most column descriptions are Massive's, from its documentation as fetched on 2026-12-01, with a few corrected where Massive's are wrong. The library writes its own descriptions of the columns it names or computes, such as Symbol and TimestampInsert.