Skip to content

tradewatch-io/python-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TradeWatch.io Python SDK

TradeWatch.io logo

Official SDK for the TradeWatch.io API.

Other SDKs

TypeScript SDK .NET SDK PHP SDK Java SDK Go SDK Ruby SDK Swift SDK Rust SDK

What is TradeWatch.io?

TradeWatch.io is a market data platform and API for real-time and historical prices across crypto, stocks, indices, currencies, and commodities.

Try the Interactive API Playground

Want to test endpoints without writing code first? Use the TradeWatch Interactive API Playground to run requests directly in your browser.

TradeWatch Interactive API Playground

Resources

Quick Start

  1. Create an API key in the TradeWatch Dashboard.
  2. Follow platform setup docs: Getting started.

Code examples

from tradewatch import TradewatchApi

client = TradewatchApi(
    api_key="YOUR_API_KEY",
)
client.account.get_usage()
import asyncio

from tradewatch import AsyncTradewatchApi

client = AsyncTradewatchApi(
    api_key="YOUR_API_KEY",
)


async def main() -> None:
    await client.account.get_usage()


asyncio.run(main())
from tradewatch import TradewatchApi

client = TradewatchApi(
    api_key="YOUR_API_KEY",
)
client.commodities.get_quotes(
    symbols="symbols",
)

Available Methods

account

Method Required Params Summary Description
get_usage() - Usage statistics Get the usage statistics of your API account

currencies

Method Required Params Summary Description
convert(from_, to) from_, to Conversion Convert one symbol to another
get_historical_ohlc(symbol, resolution, start, end) symbol, resolution, start, end Get Historical Ohlc Get historical OHLC candles for a symbol in a selected resolution and time range.
get_historical_ticks(symbol, start, end) symbol, start, end Get Historical Ticks Get raw historical ticks for a symbol in a selected time range using cursor pagination.
get_insights() - Get Insights Get recent currencies insights.
get_quote(symbol) symbol Last Quote Get the last quote tick for the provided symbol.
get_quotes(symbols) symbols Last Quotes Get the last quote tick for the provided symbols.
get_symbols() - Available Symbols Get list of available symbols

crypto

Method Required Params Summary Description
convert(from_, to) from_, to Conversion Convert one symbol to another
get_exchanges() - Available Exchanges Get list of available cryptocurrency exchanges
get_historical_ohlc(symbol, resolution, start, end) symbol, resolution, start, end Get Historical Ohlc Get historical OHLC candles for a symbol in a selected resolution and time range.
get_historical_ticks(symbol, start, end) symbol, start, end Get Historical Ticks Get raw historical ticks for a symbol in a selected time range using cursor pagination.
get_insights() - Get Insights Get recent crypto insights.
get_quote(symbol) symbol Last Quote Get the last quote tick for the provided symbol.
get_quotes(symbols) symbols Last Quotes Get the last quote tick for the provided symbols.
get_symbols() - Available Symbols Get list of available symbols

indices

Method Required Params Summary Description
get_historical_ohlc(symbol, resolution, start, end) symbol, resolution, start, end Get Historical Ohlc Get historical OHLC candles for a symbol in a selected resolution and time range.
get_historical_ticks(symbol, start, end) symbol, start, end Get Historical Ticks Get raw historical ticks for a symbol in a selected time range using cursor pagination.
get_insights() - Get Insights Get recent indices insights.
get_quote(symbol) symbol Last Quote Get the last quote tick for the provided symbol.
get_quotes(symbols) symbols Last Quotes Get the last quote tick for the provided symbols.
get_symbols() - Available Symbols Get list of available symbols

stocks

Method Required Params Summary Description
get_historical_ohlc(symbol, resolution, start, end) symbol, resolution, start, end Get Historical Ohlc Get historical OHLC candles for a symbol in a selected resolution and time range.
get_historical_ticks(symbol, start, end) symbol, start, end Get Historical Ticks Get raw historical ticks for a symbol in a selected time range using cursor pagination.
get_insights() - Get Insights Get recent stocks insights.
get_market_holidays(start, end) start, end Get Market Holidays Get market holidays. It takes half-days into account.
get_market_status() - Get Market Status Get the current status (open or closed) of a market. It takes holidays and half-days into account but does not factor in circuit breakers or halts.
get_markets() - Get Markets Get details about the markets available in this API.
get_quote(symbol) symbol Last Quote Get the last quote tick for the provided symbol.
get_quotes(symbols) symbols Last Quotes Get the last quote tick for the provided symbols.
get_stock_data(symbol) symbol Get Stock Data Get Stock Data
get_symbols() - Available Symbols Get list of available symbols
get_trading_hours(start, end) start, end Get Trading Hours Get trading hours. It takes half-days into account.
stock_get_countries() - Available Countries Get list of available countries

commodities

Method Required Params Summary Description
get_historical_ohlc(symbol, resolution, start, end) symbol, resolution, start, end Get Historical Ohlc Get historical OHLC candles for a symbol in a selected resolution and time range.
get_historical_ticks(symbol, start, end) symbol, start, end Get Historical Ticks Get raw historical ticks for a symbol in a selected time range using cursor pagination.
get_insights() - Get Insights Get recent commodities insights.
get_quote(symbol) symbol Last Quote Get the last quote tick for the provided symbol.
get_quotes(symbols) symbols Last Quotes Get the last quote tick for the provided symbols.
get_symbols() - Available Symbols Get list of available symbols
get_types() - Available Types Get list of available commodity types

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages