You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| get_account() |`GET /account` and |`Account` entity.|
113
+
| get_order_by_client_order_id(client_order_id) |`GET /orders` with client_order_id |`Order` entity.|
114
+
| list_orders(status=None, limit=None, after=None, until=None, direction=None, nested=None) |`GET /orders`| list of `Order` entities. `after` and `until` need to be string format, which you can obtain by `pd.Timestamp().isoformat()`|
| get_barset(symbols, timeframe, limit, start=None, end=None, after=None, until=None) |`GET /bars/{timeframe}`| Barset with `limit` Bar objects for each of the the requested symbols. `timeframe` can be one of `minute`, `1Min`, `5Min`, `15Min`, `day` or `1D`. `minute` is an alias of `1Min`. Similarly, `day` is an alias of `1D`. `start`, `end`, `after`, and `until` need to be string format, which you can obtain with `pd.Timestamp().isoformat()``after` cannot be used with `start` and `until` cannot be used with `end`.|
124
+
| get_aggs(symbol, timespan, multiplier, _from, to)|`GET /aggs/ticker/{symbol}/range/{multiplier}/{timespan}/{from}/{to}`|`Aggs` entity. `multiplier` is the size of the timespan multiplier. `timespan` is the size of the time window, can be one of `minute`, `hour`, `day`, `week`, `month`, `quarter` or `year`. `_from` and `to` must be in `YYYY-MM-DD` format, e.g. `2020-01-15`.|
| get_portfolio_history(date_start=None, date_end=None, period=None, timeframe=None, extended_hours=None) |`GET /account/portfolio/history`| PortfolioHistory entity. PortfolioHistory.df can be used to get the results as a dataframe|
130
+
131
+
### Rest Examples
118
132
119
133
Below is an example of submitting a bracket order.
| subscribe(channels) | Request "listen" to the server. `channels` must be a list of string channel names.|
230
+
| unsubscribe(channels) | Request to stop "listening" to the server. `channels` must be a list of string channel names.|
231
+
| run(channels) | Goes into an infinite loop and awaits for messages from the server. You should set up event listeners using the `on` or `register` method before calling `run`. |
232
+
| on(channel_pat) | As in the above example, this is a decorator method to add an event handler function. `channel_pat` is used as a regular expression pattern to filter stream names.|
233
+
| register(channel_pat, func) | Registers a function as an event handler that is triggered by the stream events that match with `channel_path` regular expression. Calling this method with the same `channel_pat` will overwrite the old handler.|
234
+
| deregister(channel_pat) | Deregisters the event handler function that was previously registered via `on` or `register` method. |
286
235
287
-
### StreamConn.deregister(channel_pat)
288
-
Deregisters the event handler function that was previously registered via `on` or
| exchanges() | Returns a list of `Exchange` entity.|
299
+
| symbol_type_map() | Returns a `SymbolTypeMap` object.|
300
+
| historic_trades_v2(symbol, date, timestamp=None, timestamp_limit=None, reverse=None, limit=None) | Returns a `TradesV2` which is a list of `Trade` entities. `date` is a date string such as '2018-2-2'. The returned quotes are from this day only. `timestamp` is an integer in Unix Epoch nanoseconds as the lower bound filter, exclusive. `timestamp_limit` is an integer in Unix Epoch nanoseconds as the maximum timestamp allowed in the results. `limit` is an integer for the number of ticks to return. Default and max is 50000. |
301
+
| TradesV2.df | Returns a pandas DataFrame object with the ticks returned by `historic_trades_v2`. |
302
+
| historic_quotes_v2(symbol, date, timestamp=None, timestamp_limit=None, reverse=None, limit=None)| Returns a `QuotesV2` which is a list of `Quote` entities. `date` is a date string such as '2018-2-2'. The returned quotes are from this day only. `timestamp` is an integer in Unix Epoch nanoseconds as the lower bound filter, exclusive. `timestamp_limit` is an integer in Unix Epoch nanoseconds as the maximum timestamp allowed in the results. `limit` is an integer for the number of ticks to return. Default and max is 50000. |
303
+
| QuotesV2.df | Returns a pandas DataFrame object with the ticks returned by the `historic_quotes_v2`.|
304
+
| historic_agg_v2(self, symbol, multiplier, timespan, _from, to, unadjusted=False, limit=None)| Returns an `AggsV2` which is a list of `Agg` entities. `AggsV2.df` gives you the DataFrame object.<br> - `multiplier` is an integer affecting the amount of data contained in each Agg object. <br> -`timespan` is a string affecting the length of time represented by each Agg object. It is one of the following values: `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`. <br> - `_from` is an Eastern Time timestamp string/object that filters the result for the lower bound, inclusive. we accept the date in these formats: datetime.datetime, datetime.date, pd.Timestamp, datetime.timestamp, isoformat string (YYYY-MM-DD).<br> - `to` is an Eastern Time timestamp string that filters the result for the upper bound, inclusive. we support the same formats as the _from field.<br> - `unadjusted` can be set to true if results should not be adjusted for splits.<br> - `limit` is an integer to limit the number of results. 3000 is the default and max value. <br>The returned entities have fields relabeled with the longer name instead of shorter ones. For example, the `o` field is renamed to `open`.|
305
+
| Aggs.df | Returns a pandas DataFrame object with the ticks returned by `hitoric_agg_v2`.|
306
+
| daily_open_close(symbol, date) | Returns a `DailyOpenClose` entity.|
307
+
| last_trade(symbol) | Returns a `Trade` entity representing the last trade for the symbol.|
308
+
| last_quote(symbol) | Returns a `Quote` entity representing the last quote for the symbol.|
309
+
| condition_map(ticktype='trades') | Returns a `ConditionMap` entity.|
310
+
| company(symbol) | Returns a `Company` entity if `symbol` is string, or a dict[symbol -> `Company`] if `symbol` is a list of string.|
311
+
| dividends(symbol) | Returns a `Dividends` entity if `symbol` is string, or a dict[symbol -> `Dividends`] if `symbol` is a list of string.|
312
+
| splits(symbol) | Returns a `Splits` entity for the symbol.|
313
+
| earnings(symbol) | Returns an `Earnings` entity if `symbol` is string, or a dict[symbol -> `Earnings`] if `symbol` is a list of string.|
314
+
| financials(symbol) | Returns an `Financials` entity if `symbol` is string, or a dict[symbol -> `Financials`] if `symbol` is a list of string. |
315
+
| news(symbol) | Returns a `NewsList` entity for the symbol.|
0 commit comments