gofigi

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 10 Imported by: 0

README

gofigi

GitHub Actions Workflow Status codecov GitHub go.mod Go version

Go binding for OpenFIGI API v3.

Overview

gofigi provides a Go interface to the OpenFIGI API. To access the OpenFIGI API and benefits from better rate limiting an account and token are required. The goal is for gofigi to be compatible with the v3 version of the OpenFigi API.

Motivation

OpenFIGI API is a great API with no go-binding.

Installation

go get github.com/tochemey/gofigi

Features

Contribution

Contributions are welcome! The project adheres to Semantic Versioning and Conventional Commits.

To contribute please:

  • Fork the repository
  • Create a feature branch
  • Code
  • Submit a pull request
Testing and Linter

Prior to submitting a pull request, please run:

go test -mod=vendor ./... -race -coverprofile=coverage.out -covermode=atomic -coverpkg=./...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterClient

type FilterClient struct {
	// contains filtered or unexported fields
}

FilterClient implements the Filter API reference: https://www.openfigi.com/api#post-v3-filter

func NewDefaultFilterClient

func NewDefaultFilterClient(apiKey string) *FilterClient

NewDefaultFilterClient creates a new instance of FilterClient using the http.DefaultClient

func NewFilterClient

func NewFilterClient(apiKey string, httpClient *http.Client) *FilterClient

NewFilterClient creates a new instance of SearchClient with the given http.Client

func (FilterClient) Filter

Filter fetches the list of stocks' information using the polygon API across all exchanges reference: https://www.openfigi.com/api#post-v3-filter

type MappingClient

type MappingClient struct {
	// contains filtered or unexported fields
}

MappingClient implements the Mapping API reference: https://www.openfigi.com/api#post-v3-mapping

func NewDefaultMappingClient

func NewDefaultMappingClient(apiKey string) *MappingClient

NewDefaultMappingClient creates a new instance of MappingClient using the http.DefaultClient

func NewMappingClient

func NewMappingClient(apiKey string, httpClient *http.Client) *MappingClient

NewMappingClient creates a new instance of MappingClient with the provided http.Client

func (MappingClient) Mappings

func (c MappingClient) Mappings(ctx context.Context, mappingRequests []*model.MappingRequest) ([]*model.MappingResponse, error)

Mappings maps third party identifiers to FIGIs. reference: https://www.openfigi.com/api#post-v3-mapping

type SearchClient

type SearchClient struct {
	// contains filtered or unexported fields
}

SearchClient implements the Search API reference: https://api.openfigi.com/v3/search

func NewDefaultSearchClient

func NewDefaultSearchClient(apiKey string) *SearchClient

NewDefaultSearchClient creates a new instance of SearchClient using the http.DefaultClient

func NewSearchClient

func NewSearchClient(apiKey string, httpClient *http.Client) *SearchClient

NewSearchClient creates a new instance of SearchClient with the given http.Client

func (SearchClient) Search

Search fetches the list of stocks' information using the polygon API across all exchanges reference: https://api.openfigi.com/v3/search

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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