[Feature] to_df where results is a model of arrays. (#6510)

* enable to_df to convert a model where all fields are arrays

* use dt for check

* static assets

* pylint

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
This commit is contained in:
Danglewood
2024-06-24 02:47:00 -07:00
committed by GitHub
parent 041e2247bf
commit faa1e896fa
5 changed files with 142 additions and 134 deletions

View File

@@ -2060,7 +2060,7 @@
"standard": [
{
"name": "underlying_symbol",
"type": "str",
"type": "List[str]",
"description": "Ticker symbol of the underlying asset.",
"default": "",
"optional": false,
@@ -2068,7 +2068,7 @@
},
{
"name": "contract_symbol",
"type": "str",
"type": "List[str]",
"description": "Symbol of the options contract.",
"default": "",
"optional": false,
@@ -2076,7 +2076,7 @@
},
{
"name": "expiration",
"type": "date",
"type": "List[date]",
"description": "Expiration date of the options contract.",
"default": "",
"optional": false,
@@ -2084,15 +2084,15 @@
},
{
"name": "dte",
"type": "int",
"type": "List[int]",
"description": "Number of days to expiration of the options contract.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "strike",
"type": "float",
"type": "List[float]",
"description": "Strike price of the options contract.",
"default": "",
"optional": false,
@@ -2100,7 +2100,7 @@
},
{
"name": "option_type",
"type": "str",
"type": "List[str]",
"description": "The type of option.",
"default": "",
"optional": false,
@@ -2108,73 +2108,73 @@
},
{
"name": "volume",
"type": "int",
"type": "List[int]",
"description": "The trading volume.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "open_interest",
"type": "int",
"type": "List[int]",
"description": "Open interest at the time.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "last_price",
"type": "float",
"type": "List[float]",
"description": "Last trade price at the time.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "last_size",
"type": "int",
"type": "List[int]",
"description": "Lot size of the last trade.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "last_timestamp",
"type": "datetime",
"type": "List[datetime]",
"description": "Timestamp of the last price.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "open",
"type": "float",
"type": "List[float]",
"description": "The open price.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "high",
"type": "float",
"type": "List[float]",
"description": "The high price.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "low",
"type": "float",
"type": "List[float]",
"description": "The low price.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "close",
"type": "float",
"type": "List[float]",
"description": "The close price.",
"default": null,
"default": "",
"optional": true,
"choices": null
}
@@ -2182,97 +2182,97 @@
"intrinio": [
{
"name": "bid",
"type": "float",
"type": "List[float]",
"description": "The last bid price at the time.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "bid_size",
"type": "int",
"type": "List[int]",
"description": "The size of the last bid price.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "bid_timestamp",
"type": "datetime",
"type": "List[datetime]",
"description": "The timestamp of the last bid price.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "ask",
"type": "float",
"type": "List[float]",
"description": "The last ask price at the time.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "ask_size",
"type": "int",
"type": "List[int]",
"description": "The size of the last ask price.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "ask_timestamp",
"type": "datetime",
"type": "List[datetime]",
"description": "The timestamp of the last ask price.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "total_bid_volume",
"type": "int",
"type": "List[int]",
"description": "Total volume of bids.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "bid_high",
"type": "float",
"type": "List[float]",
"description": "The highest bid price.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "bid_low",
"type": "float",
"type": "List[float]",
"description": "The lowest bid price.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "total_ask_volume",
"type": "int",
"type": "List[int]",
"description": "Total volume of asks.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "ask_high",
"type": "float",
"type": "List[float]",
"description": "The highest ask price.",
"default": null,
"default": "",
"optional": true,
"choices": null
},
{
"name": "ask_low",
"type": "float",
"type": "List[float]",
"description": "The lowest ask price.",
"default": null,
"default": "",
"optional": true,
"choices": null
}

View File

@@ -253,59 +253,59 @@ class ROUTER_derivatives_options(Container):
OptionsSnapshots
----------------
underlying_symbol : str
underlying_symbol : List[str]
Ticker symbol of the underlying asset.
contract_symbol : str
contract_symbol : List[str]
Symbol of the options contract.
expiration : date
expiration : List[date]
Expiration date of the options contract.
dte : Optional[int]
dte : List[Optional[int]]
Number of days to expiration of the options contract.
strike : float
strike : List[float]
Strike price of the options contract.
option_type : str
option_type : List[str]
The type of option.
volume : Optional[int]
volume : List[Optional[int]]
The trading volume.
open_interest : Optional[int]
open_interest : List[Optional[int]]
Open interest at the time.
last_price : Optional[float]
last_price : List[Optional[float]]
Last trade price at the time.
last_size : Optional[int]
last_size : List[Optional[int]]
Lot size of the last trade.
last_timestamp : Optional[datetime]
last_timestamp : List[Optional[datetime]]
Timestamp of the last price.
open : Optional[float]
open : List[Optional[float]]
The open price.
high : Optional[float]
high : List[Optional[float]]
The high price.
low : Optional[float]
low : List[Optional[float]]
The low price.
close : Optional[float]
close : List[Optional[float]]
The close price.
bid : Optional[float]
bid : List[Optional[float]]
The last bid price at the time. (provider: intrinio)
bid_size : Optional[int]
bid_size : List[Optional[int]]
The size of the last bid price. (provider: intrinio)
bid_timestamp : Optional[datetime]
bid_timestamp : List[Optional[datetime]]
The timestamp of the last bid price. (provider: intrinio)
ask : Optional[float]
ask : List[Optional[float]]
The last ask price at the time. (provider: intrinio)
ask_size : Optional[int]
ask_size : List[Optional[int]]
The size of the last ask price. (provider: intrinio)
ask_timestamp : Optional[datetime]
ask_timestamp : List[Optional[datetime]]
The timestamp of the last ask price. (provider: intrinio)
total_bid_volume : Optional[int]
total_bid_volume : List[Optional[int]]
Total volume of bids. (provider: intrinio)
bid_high : Optional[float]
bid_high : List[Optional[float]]
The highest bid price. (provider: intrinio)
bid_low : Optional[float]
bid_low : List[Optional[float]]
The lowest bid price. (provider: intrinio)
total_ask_volume : Optional[int]
total_ask_volume : List[Optional[int]]
Total volume of asks. (provider: intrinio)
ask_high : Optional[float]
ask_high : List[Optional[float]]
The highest ask price. (provider: intrinio)
ask_low : Optional[float]
ask_low : List[Optional[float]]
The lowest ask price. (provider: intrinio)
Examples