import ccxt
# Initialize the exchange (e.g., Binance)
exchange = ccxt.binance({
'apiKey': 'YOUR_API_KEY',
'secret': 'YOUR_API_SECRET',
})
# Load market data for GBP/USD
symbol = 'GBP/USDT' # GBP/USD trading pair
ohlcvs = exchange.fetch_ohlcv(symbol, '1h') # Get 1-hour OHLCV data
# Print the first few data points
for data in ohlcvs[:5]:
print(data)
# Initialize the exchange (e.g., Binance)
exchange = ccxt.binance({
'apiKey': 'YOUR_API_KEY',
'secret': 'YOUR_API_SECRET',
})
# Load market data for GBP/USD
symbol = 'GBP/USDT' # GBP/USD trading pair
ohlcvs = exchange.fetch_ohlcv(symbol, '1h') # Get 1-hour OHLCV data
# Print the first few data points
for data in ohlcvs[:5]:
print(data)
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.