marketstack

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2022 License: CC0-1.0 Imports: 0 Imported by: 0

README

Marketstack

Marketstack Go API

Quick Start

builder, err := request.NewBuilder(
    request.BuilderWithBaseURL("https://api.marketstack.com/v1/"),
    request.BuilderWithAPIKey("your-api-key"),
)
if err != nil {
    // handle error
}

client, err := api.NewClient(builder)
if err != nil {
    // handle error
}

res, err := client.EOD(context.TODO, []string{"AAPL"})
if err != nil {
    // handle error
}

log.Printf("%+v", res)

The above example will request all stocks for the AAPL ticker. Variadac options are used in the client.EOD function to add optional parameters to the request, eg. sort order, date range, etc. More information on optional parameters can be found for each specific message on the official Market Stack REST API documentation: https://marketstack.com/documentation

Testing

make test

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL