Quick Start
Install the public release
go get github.com/tigerfintech/[email protected]Go 1.20 or newer is required. Enable access in the Developer Center, then review User and Account Types, Market Data Access and Limits, Markets and Trading Rules, and Rate Limits.
The configuration exported from the Developer Center takes precedence. You can also use the shared configuration template. For an account that requires a local token file, use the shared token template. Copy the applicable template, remove the .example suffix, replace the placeholders, and never commit credentials.
package main
import (
"fmt"
"log"
"github.com/tigerfintech/openapi-go-sdk/config"
"github.com/tigerfintech/openapi-go-sdk/quote"
)
func main() {
cfg, err := config.NewClientConfig()
if err != nil { log.Fatal(err) }
qc := quote.NewQuoteClientFromConfig(cfg)
states, err := qc.GetMarketState("US")
if err != nil { log.Fatal(err) }
fmt.Printf("%#v\n", states)
}Client constructors
// package quote
func NewQuoteClient(httpClient *client.HttpClient) *QuoteClient
func NewQuoteClientFromConfig(cfg *config.ClientConfig) *QuoteClient
// package trade
func NewTradeClient(httpClient *client.HttpClient, account string) *TradeClient
func NewTradeClientFromConfig(cfg *config.ClientConfig) *TradeClient
// package push
func NewPushClient(cfg *config.ClientConfig, opts ...PushClientOption) *PushClientUpdated about 1 month ago
Did this page help you?
