-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Thought I'd start a separate issue to track this. I have a few questions:
export interface IProvider {
getMarketData(tickerId: string, timeframe: string, limit?: number, sDate?: number, eDate?: number): Promise<any>;
getSymbolInfo(tickerId: string): Promise<ISymbolInfo>;
}getMarketData has a return type of any, this doesnt seem right as there is a lot of expected values used from it in PineTS. Should this not be an IBar type or something?
sDate and eDate, are these expected to be seconds or ms? Since they are numbers how are you handling timezone? Is everything forced to GMT or something else? Say someone wants to start from NY open on 2025-12-01, so 9:30AM Eastern Time, what would be passed in for that? Alpaca wants an RFC-3339 compliant string so I must convert the number.
Alpaca really doesn't have much data in the way of the ISymbolInfo, the info call returns:
{
"id": "6b6944fb-a54a-4d2e-9a13-1565618376b0",
"class": "us_equity", // type
"exchange": "NASDAQ",
"symbol": "QQQI", //ticker
"name": "NEOS ETF Trust NEOS Nasdaq 100 High Income ETF", //description
"status": "active",
"tradable": true,
"marginable": true,
"maintenance_margin_requirement": 30,
"margin_requirement_long": "30",
"margin_requirement_short": "30",
"shortable": true,
"easy_to_borrow": true,
"fractionable": true,
"attributes": [
"fractional_eh_enabled",
"has_options"
]
}I am prefixing ALPACA: to main_tickerid and tickerid. The other values I'm just defaulting.