Skip to main content

Stock Price

The following endpoints retrieve daily close prices of a stock.


Yl Price

Returns the Stock price timeseries of a stock

Examples

Note: If you are using Windows, adjust the syntax:

  • Replace line breaks (\) with caret (^).
  • Use double quotes (") instead of single quotes (').
curl -X 'GET' \
'https://quant.api.yukkalab.com/trading/company/apple/yl_price?date_from=2023-01-01&date_to=2023-01-05' \
-H 'accept: application/json' \
-H "Authorization: Bearer $YUKKA_TOKEN"

Return type

YLPriceResponse

Example Response

{"exchange_code":"US","exchange_name":"USA Stocks","currency":"USD","ticker":"AAPL.US","prices":[{"date":"2023-01-03","price":124.70680236816406},{"date":"2023-01-04","price":125.99310302734375}],"entity_info":{"type":"company","alpha_id":"apple","compound_key":"company:apple"}}

Parameters

NameTypeDescriptionNotes
entity_typestr
entity_idstr
date_fromdateDate to start from when using time ranges[optional]
date_todateDate to end from (exclusively) when using time ranges[optional]
default_time_backstrDefault period of time that is used when no end date is supplied[optional][default to 1w;]

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
422Validation Error-

Yl Price Itemized

Returns the Stock price timeseries of a stock

Examples

Note: If you are using Windows, adjust the syntax:

  • Replace line breaks (\) with caret (^).
  • Use double quotes (") instead of single quotes (').
curl -X 'POST' \
'https://quant.api.yukkalab.com/trading/portfolio/yl_price_itemized?date_from=2023-01-01&date_to=2023-01-05' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $YUKKA_TOKEN" \
-d '["company:apple", "company:sap"]'

Return type

YLPriceItemizedResponse

Example Response

{"yl_price_itemized":[{"exchange_code":"US","exchange_name":"USA Stocks","currency":"USD","ticker":"AAPL.US","prices":[{"date":"2023-01-03","price":124.70680236816406},{"date":"2023-01-04","price":125.99310302734375}],"entity_info":{"type":"company","alpha_id":"apple","compound_key":"company:apple"}},{"exchange_code":"XETRA","exchange_name":"XETRA Exchange","currency":"EUR","ticker":"SAP.XETRA","prices":[{"date":"2023-01-02","price":95.78700256347656},{"date":"2023-01-03","price":96.85880279541016},{"date":"2023-01-04","price":99.01210021972656}],"entity_info":{"type":"company","alpha_id":"sap","compound_key":"company:sap"}}]}

Parameters

NameTypeDescriptionNotes
request_bodyList[str]
date_fromdateDate to start from when using time ranges[optional]
date_todateDate to end from (exclusively) when using time ranges[optional]
default_time_backstrDefault period of time that is used when no end date is supplied[optional][default to 1w;]

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Successful Response-
422Validation Error-