Closed Jefferson111 closed 1 year ago
Thanks for bringing this issue up. This is law-related, and we abide US law, so our team will check with layers. Here, we may consider providing sample data (say a csv file) for demo purposes.
Would be happy to know about good alternatives, under US law.
A sample of data sounds like it would be sufficient.
There are not many options for free, accessible cryptocurrency data that are future-proof. Cryptocurrency exchanges (CEX) are currently facing regulatory scrutiny, and laws and regulations can hinder their operations. On the other hand, data analytics websites such as Coingecko, TokentTerminal charge a premium for access to their APIs and typically require keys. Web3 data sources like Graph Protocol also charge their users for queries.
One possible solution for the future would be to fully expose the capabilities of CCXT under data_processors
. CCXT is able to fetch data from multiple sources, and there is a dedicated community maintaining it. Currently, CCXT in data_processors
routes directly to Binance. It might be possible to make some adjustments so that users can select their data source through CCXT and default to CEXes that are currently compliant with US laws, such as Coinbase.
Alternatively, Coinbase is the only reliable option left, as it is compliant with US laws but still vulnerable to a bank run. Coinbase code:
import requests
# Set the URL for the Coinbase Pro API
url = "https://api.pro.coinbase.com/products/BTC-USD/candles"
# Set the parameters for the API request
# In this example, we are retrieving 5-minute klines for the past 24 hours
params = {
"granularity": 300,
"start": "2022-01-01T00:00:00Z",
"end": "2022-01-02T00:00:00Z"
}
# Make the request to the Coinbase Pro API
response = requests.get(url, params=params)
# The API returns an array of klines
klines = response.json()
# Print the klines
print(klines)
@Jefferson111
Thanks for your valuable suggestions.
Is your feature request related to a problem? Please describe. US has block Binance API. Google Collab instances usually operates with US IP addresses.
Describe the solution you'd like We need an alternative data source for crypto trading data. After SBF's fiasco, Zhu Su's rug and Do Kwon's Ponzi collapse, I foresee that regulators are gonna continue to FUD Binance and we will not see the resumption of the API anytime soon in the US region.
Describe alternatives you've considered Quite a lot of retail and small institutions uses Google Collab. And many of us are located in US. We don't really have a choice.
Note: CCXT uses Binance API in the underlying code, so there isn't any other data sources left.