I cant get rid of this error: API request failed: Unrecognized parameter "startDt"
I have run the !pip install --upgrade p123api # Install p123api if missing
try:
client = p123api.Client(api_id='XXX', api_key='XXX') # Your ID and Key
rankings = [
"Optimize System - Copy(2078)190424udob300n-40-48",
"Optimize System - Copy(2078)190424udob300n-40-47",
"Optimize System - Copy(2078)190424udob300n-40-46",
] # Liste med dine rankingsystemer
for ranking in rankings:
result = client.screen_backtest(
{
'screen': {
'type': 'stock', # Stock or ETF
'universe': '1. Pareto - US CANADA volumfilter',
'maxNumHoldings': 25, # 0 for all
'method': 'long', # long, short, long/short, hedged
'currency': 'USD', # USD, CAD, CHF, EUR, GBP, NOK, PLN, SEK, TRY
'benchmark': 'iwm',
'ranking': ranking,
'startDt': "2021-01-01", # Bruker 'StartDt'
'EndDt': "2021-06-30", # Bruker 'EndDt'
'pitMethod': 'Prelim', # Prelim eller Complete
'precision': 2, # 2, 3, 4
'transPrice': 3, # 1 - Next Open, 4 - Next Close, 3 - Next Average of Hi and Low
'slippage': 0.25,
'longWeight': 100,
'rankTolerance': 5,
'rebalFreq': 'Every Week', # Every Week, Every Month
'riskStatsPeriod': "Monthly" # Monthly, Weekly, Daily
}
})
print(f"Ranking: {ranking}\nResult: {result}\n")
except p123api.ClientException as e:
print(e)