Hey there! Let me walk you through how to work with our flat file system. We've built this to work just like Amazon S3 but focused specifically on what crypto developers need most. Think of it as your filing cabinet for crypto market data. While it looks and feels like Amazon S3, we've streamlined it to focus on what matters - grabbing and listing files.
Understanding Flat Files
Flat files are a type of database that stores data in a plain text file. Each line of the file typically represents a single record or data point. This simple structure makes flat files easy to read and write, and they can be processed by a wide variety of software tools. However, because they lack the complex organizational structures of relational databases, they are best suited for relatively small datasets with simple relationships.
In the context of the Flat Files S3 API, several types of flat files can be accessed:
Each of these file types serves a unique purpose and contains different data fields.
- The ‘
quotes
’ file type contains data about the best bid and asks prices and volumes for a particular asset. - The ‘
trades
’ file type, on the other hand, includes information about individual trades, such as the price, volume, and time of each trade. - The ‘
limitbook_snapshot_X
’ and ‘limitbook_full
’ file types provide more detailed information about the order book, including the prices and volumes at different levels of the order book. - The ‘
ohlcv_active_consolidated
’ file type contains consolidated data about the open, high, low, close, and volume (OHLCV) for a particular asset over a specified period.
Using the Flat Files REST API
The API operates on the HTTP protocol, adhering to a Request-Reply pattern. The API is compatible with HTTP1.0
, HTTP1.1
, and HTTP2.0
standards, ensuring broad compatibility with various systems and tools. For secure data transmission, the API’s endpoints can be accessed through HTTPS, while HTTP is available for connections where security is not a primary concern.
This RESTful approach allows developers to interact with the API using standard HTTP methods, making it a familiar and accessible tool for those with experience in web development. The Request-Reply pattern is straightforward and intuitive, with each request sent to the server receiving a corresponding response.
Authentication and supported operations
To authenticate to this API, you need to provide an API key in your requests. The API supports several operations that correspond to Amazon S3 REST API operations, such as listing objects and downloading objects. However, not all parameters presented in the corresponding Amazon S3 documentation are required for these operations.
Error handling
If an HTTP request returns a status code other than 200, it should be considered as failed. In such cases, you can expect an additional XML inside the body of the response with the error message encapsulated inside it. The error messages are compliant with Amazon S3 REST Error Responses.
Compatible software
The Flat Files S3 API is compatible with the AWS SDK. After installing the AWS CLI, you can configure it with your AWS access key ID, secret access key, default region, and default output format. Once the AWS CLI is installed and configured, you can use it to interact with the S3 API Coinapi using various commands.
In conclusion, the Flat Files S3 API by CoinAPI provides a powerful and flexible way to access cryptocurrency market data stored in flat files. Whether you’re building a trading bot, conducting market analysis, or developing a data visualization tool, this API offers a robust solution for your data needs.