Skip to main content

A Python library for retrieving financial data.

Project description

Financial Data Retrieval Library

oandadata

oandadata is a Python library designed to retrieve financial data from the OANDA API. It provides a simple and efficient way to access candle data for a specified currency pair.

Features

  • Easy-to-use API: With just a few lines of code, you can retrieve candle data for any currency pair available on the OANDA platform.
  • Flexible Parameters: You can specify the number of candles to retrieve, the timeframe for each candle, the type of price data to retrieve, and the currency pair.
  • Pandas Integration: The retrieved data is returned as a pandas DataFrame, making it easy to analyze and manipulate the data.

Example

Here's an example of how you can use oandadata to retrieve candle data:

import oandadata

# Define your parameters
token = 'your_api_token'
count = 100
timeframe = 'H1'
price_type = 'MBA'
currency_pair = 'XAU_CAD'

# Retrieve the candle data
df = oandadata.get_candles(token, count, timeframe, price_type, currency_pair)

# Now 'df' is a DataFrame containing the candle data

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oandadata-0.1.4.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

oandadata-0.1.4-py2.py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page