Skip to content

Latest commit

 

History

History
208 lines (133 loc) · 15.4 KB

README.md

File metadata and controls

208 lines (133 loc) · 15.4 KB

Quotes

(quotes)

Overview

Controller for retrieving quotes data, also known as quotes or passive level 1 data.

Available Operations

get_v1_quotes_symbol_id_history

Get historical quote updates within requested time range, returned in time ascending order.

Example Usage

import coinapi

s = coinapi.CoinAPI(
    api_key="<YOUR_API_KEY_HERE>",
)


res = s.quotes.get_v1_quotes_symbol_id_history(symbol_id='<value>', time_start='<value>', time_end='<value>', limit=100)

if res.content is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
symbol_id str ✔️ Symbol identifier for requested timeseries (from the Metadata -> Symbols)
time_start Optional[str] Starting time in ISO 8601 (required)
time_end Optional[str] Timeseries ending time in ISO 8601 (optional, if not supplied then the data is returned to the end or when result elements count reaches the limit)
limit Optional[int] Amount of items to return (optional, minimum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request)

Response

operations.GetV1QuotesSymbolIDHistoryResponse

Errors

Error Object Status Code Content Type
errors.CoinAPIError 4x-5xx /

get_v1_quotes_current

Get current quotes for all symbols or for a specific symbol.

:::info When requesting current data for a specific symbol, output is not encapsulated into JSON array as only one item is returned. :::

Example Usage

import coinapi

s = coinapi.CoinAPI(
    api_key="<YOUR_API_KEY_HERE>",
)


res = s.quotes.get_v1_quotes_current(filter_symbol_id='<value>')

if res.content is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
filter_symbol_id Optional[str] Comma or semicolon delimited parts of symbol identifier used to filter response. (optional)

Response

operations.GetV1QuotesCurrentResponse

Errors

Error Object Status Code Content Type
errors.CoinAPIError 4x-5xx /

get_v1_quotes_symbol_id_current

[quotes] Current quotes for a specific symbol

Example Usage

import coinapi

s = coinapi.CoinAPI(
    api_key="<YOUR_API_KEY_HERE>",
)


res = s.quotes.get_v1_quotes_symbol_id_current(symbol_id='<value>')

if res.content is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
symbol_id str ✔️ The symbol identifier (from the Metadata -> Symbols)

Response

operations.GetV1QuotesSymbolIDCurrentResponse

Errors

Error Object Status Code Content Type
errors.CoinAPIError 4x-5xx /

get_v1_quotes_latest

Get latest updates of the quotes up to 1 minute ago. Latest data is always returned in time descending order.

Example Usage

import coinapi

s = coinapi.CoinAPI(
    api_key="<YOUR_API_KEY_HERE>",
)


res = s.quotes.get_v1_quotes_latest(filter_symbol_id='<value>', limit=100)

if res.content is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
filter_symbol_id Optional[str] Comma or semicolon delimited parts of symbol identifier used to filter response. (optional)
limit Optional[int] Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request)

Response

operations.GetV1QuotesLatestResponse

Errors

Error Object Status Code Content Type
errors.CoinAPIError 4x-5xx /

get_v1_quotes_symbol_id_latest

[quotes] Latest quote updates for a specific symbol

Example Usage

import coinapi

s = coinapi.CoinAPI(
    api_key="<YOUR_API_KEY_HERE>",
)


res = s.quotes.get_v1_quotes_symbol_id_latest(symbol_id='<value>', limit=100)

if res.content is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
symbol_id str ✔️ Symbol identifier of requested timeseries (from the Metadata -> Symbols)
limit Optional[int] Amount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request)

Response

operations.GetV1QuotesSymbolIDLatestResponse

Errors

Error Object Status Code Content Type
errors.CoinAPIError 4x-5xx /