Gidari is a library for batch querying data and persisting the results to local storage.
go get github.com/alpstable/gidari@latest
For information on using the CLI, see here.
Gidari supports HTTP and network socket services. There are two ways to use an HTTP service:
- Iterate over
http.Response
data, for pre-definedhttp.Request
s. - Define a writer to concurrently "write" response data for pre-defined
http.Request
s.
See the Go Docs or Web-to-Storage Examples section for examples.
Network sockets involves subscribing to a socket (such a web socket) and continuously iterating over the data via ReadWriter interface. The results would then be sent to a user-defined ListWriter to be stored. See the Go Docs or Network Socket Examples section for examples.
Protocol | Parameters | Description |
---|---|---|
Basic | Requires a username/email and password | The server will authorize the request only if it can validate the user-ID and password for the protection space of the Request-URI |
Coinbase | Requires a key, passphrase and secrete generated in the Coinbase Exchange GUI | The Coinbase API requires a CB-ACCESS-SIGN header that is generated by creating a sha256 HMAC using the base64-decoded secret key on the prehash string from a timestamp + method + requestPath + body combination |
Kraken | Requires key and secret generated in the Kraken Pro GUI | The Kraken spot API uses a custom authentication algorithm that is based on a combination of API key, nonce, and message signature. The signature is generated using a hash-based message authentication code (HMAC) with SHA-512 as the hash function. |
Data Type | Writer | Example | Description |
---|---|---|---|
CSV | csvpb | examples/csvp | Use the HTTPService to write web API data to stdout as CSV |
MongoDB Document | mongopb | exmaples/mongopb | Use the HTTPService to write web API data to a MongoDB Collection |
Type | Writer | Example | Description |
---|---|---|---|
WebSocket | fmt.Println |
examples/websocket | Subscribe to the Coinbase WebSocket and print the results |
Follow this guide for information on contributing.
- Public REST APIs from Postman Documenter
- Go Gopher artwork by Victoria Trum
- The original Go gopher was designed by the awesome Renee French