service

package
v0.0.0-...-8cb3723 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AssetsList = []AssetObj{
	AssetObj{
		ID:            "b0b6dd9d-8b9b-48a9-ba46-b9d54906e415",
		Class:         "us_equity",
		Exchange:      "NASDAQ",
		Symbol:        "AAPL",
		Name:          "Apple Inc. Common Stock",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "f30d734c-2806-4d0d-b145-f9fade61432b",
		Class:         "us_equity",
		Exchange:      "NASDAQ",
		Symbol:        "GOOG",
		Name:          "Alphabet Inc. Class C Capital Stock",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "69b15845-7c63-4586-b274-1cfdfe9df3d8",
		Class:         "us_equity",
		Exchange:      "NASDAQ",
		Symbol:        "GOOGL",
		Name:          "Alphabet Inc. Class A Common Stock",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "fc6a5dcd-4a70-4b8d-b64f-d83a6dae9ba4",
		Class:         "us_equity",
		Exchange:      "NASDAQ",
		Symbol:        "FB",
		Name:          "Facebook, Inc. Class A Common Stock",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "39a26dc1-927a-4590-b103-b8068a013e7f",
		Class:         "us_equity",
		Exchange:      "NYSE",
		Symbol:        "SPOT",
		Name:          "Spotify Technology S.A.",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "83e52ac1-bb18-4e9f-b68d-dda5a8af3ec0",
		Class:         "us_equity",
		Exchange:      "NYSE",
		Symbol:        "SNAP",
		Name:          "Snap Inc.",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "8ccae427-5dd0-45b3-b5fe-7ba5e422c766",
		Class:         "us_equity",
		Exchange:      "NASDAQ",
		Symbol:        "TSLA",
		Name:          "Tesla, Inc. Common Stock",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "57c36644-876b-437c-b913-3cdb58b18fd3",
		Class:         "us_equity",
		Exchange:      "NYSE",
		Symbol:        "GE",
		Name:          "General Electric Company",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "4f5baf1e-0e9b-4d85-b88a-d874dc4a3c42",
		Class:         "us_equity",
		Exchange:      "NYSE",
		Symbol:        "V",
		Name:          "VISA Inc.",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "2140998d-7f62-46f2-a9b2-e44350bd4807",
		Class:         "us_equity",
		Exchange:      "NYSE",
		Symbol:        "MA",
		Name:          "Mastercard Incorporated",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "f801f835-bfe6-4a9d-a6b1-ccbb84bfd75f",
		Class:         "us_equity",
		Exchange:      "NASDAQ",
		Symbol:        "AMZN",
		Name:          "Amazon.com, Inc. Common Stock",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "bb2a26c0-4c77-4801-8afc-82e8142ac7b8",
		Class:         "us_equity",
		Exchange:      "NASDAQ",
		Symbol:        "NFLX",
		Name:          "Netflix, Inc. Common Stock",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
	AssetObj{
		ID:            "662a919f-1455-497c-90e7-f76248e6d3a6",
		Class:         "us_equity",
		Exchange:      "NYSE",
		Symbol:        "TME",
		Name:          "Tencent Music Entertainment Group American Depositary Shares, each representing two Class A Ordinary",
		Status:        "active",
		Tradable:      true,
		Marginable:    true,
		Shortable:     true,
		EasyToBorrow:  true,
		Fractionable:  true,
		IsWatchlisted: false,
	},
}

Functions

func AccountRouter

func AccountRouter(svc *account.Service, db orm.DB, r *gin.RouterGroup)

AccountRouter sets up all the controller functions to our router

func AssetsRouter

func AssetsRouter(svc *assets.Service, acc *account.Service, r *gin.RouterGroup)

func AuthRouter

func AuthRouter(svc *auth.Service, r *gin.Engine)

AuthRouter creates new auth http service

func ParseRsaPrivateKeyFromPemStr

func ParseRsaPrivateKeyFromPemStr(privPEM string) (*rsa.PrivateKey, error)

func PlaidRouter

func PlaidRouter(svc *plaid.Service, acc *account.Service, r *gin.RouterGroup)

func TransferRouter

func TransferRouter(svc *transfer.Service, acc *account.Service, r *gin.RouterGroup)

func UserRouter

func UserRouter(svc *user.Service, r *gin.RouterGroup)

UserRouter declares the orutes for users router group

Types

type AccountService

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

AccountService represents the account http service

type Asset

type Asset struct {
	Symbol string `json:"symbol"`
}

type AssetObj

type AssetObj struct {
	ID            string      `json:"id"`
	Class         string      `json:"class"`
	Exchange      string      `json:"exchange"`
	Symbol        string      `json:"symbol"`
	Name          string      `json:"name"`
	Status        string      `json:"status"`
	Tradable      bool        `json:"tradable"`
	Marginable    bool        `json:"marginable"`
	Shortable     bool        `json:"shortable"`
	EasyToBorrow  bool        `json:"easy_to_borrow"`
	Fractionable  bool        `json:"fractionable"`
	Ticker        interface{} `json:"ticker"`
	IsWatchlisted bool        `json:"is_watchlisted"`
}

type Assets

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

Auth represents auth http service

type AssetsResponse

type AssetsResponse struct {
	Class        string `json:"class"`
	EasyToBorrow bool   `json:"easy_to_borrow"`
	Exchange     string `json:"exchange"`
	ID           string `json:"id"`
	Marginable   bool   `json:"marginable"`
	Shortable    bool   `json:"shortable"`
	Status       string `json:"status"`
	Symbol       string `json:"symbol"`
	Tradable     bool   `json:"tradable"`
}

type Auth

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

Auth represents auth http service

type BrokerAccount

type BrokerAccount struct {
	Contact     BrokerContact     `json:"contact"`
	Identity    BrokerIdentity    `json:"identity"`
	Disclosures BrokerDisclosures `json:"disclosures"`
	Agreements  []BrokerAgreement `json:"agreements"`
}
type BrokerDocument struct {
	DocumentType    string `json:"document_type"`
	DocumentSubType string `json:"document_sub_type"`
	Content         string `json:"content"`
	MimeType        string `json:"mime_type"`
}
type BrokerTrustedContact struct {
	Code            string `json:"code"`
	Url             string `json:"url"`
	ReferredSignups int    `json:"referred_signups"`
}

type BrokerAccountResponse

type BrokerAccountResponse struct {
	AccountNumber string `json:"account_number"`
	CreatedAt     string `json:"created_at"`
	Currency      string `json:"currency"`
	ID            string `json:"id"`
	LastEquity    string `json:"last_equity"`
	Status        string `json:"status"`
}

type BrokerAgreement

type BrokerAgreement struct {
	Agreement string `json:"agreement"`
	SignedAt  string `json:"signed_at"`
	IPAddress string `json:"ip_address"`
}

type BrokerContact

type BrokerContact struct {
	Email   string   `json:"email_address"`
	Phone   string   `json:"phone_number"`
	Address []string `json:"street_address"`
	City    string   `json:"city"`
	State   string   `json:"state"`
	Country string   `json:"country"`
}

type BrokerDisclosures

type BrokerDisclosures struct {
	IsControlPerson             bool `json:"is_control_person"`
	IsAffiliatedExchangeOrFinra bool `json:"is_affiliated_exchange_or_finra"`
	IsPoliticallyExposed        bool `json:"is_politically_exposed"`
	ImmediateFamilyExposed      bool `json:"immediate_family_exposed"`
}

type BrokerIdentity

type BrokerIdentity struct {
	FirstName             string   `json:"given_name"`
	LastName              string   `json:"family_name"`
	DateOfBirth           string   `json:"date_of_birth"`
	TaxID                 string   `json:"tax_id"`
	TaxIDType             string   `json:"tax_id_type"`
	CountryOfCitizenship  string   `json:"country_of_citizenship"`
	CountryOfBirth        string   `json:"country_of_birth"`
	CountryOfTaxResidence string   `json:"country_of_tax_residence"`
	FundingSource         []string `json:"funding_source"`
}

type City

type City struct {
	Name  string `json:"name"`
	ASCII string `json:"ascii"`
	LAT   string `json:"lat"`
	LNG   string `json:"lng"`
}

type Country

type Country struct {
	Name      string `json:"name"`
	ShortCode string `json:"short_code"`
}

type ErrorBody

type ErrorBody struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type Plaid

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

Auth represents auth http service

type Referral

type Referral struct {
	Code            string `json:"code"`
	Url             string `json:"url"`
	ReferredSignups int    `json:"referred_signups"`
}
type ShareableProfileLink struct {
	URL  string `json:"url"`
	Code string `json:"code"`
}

type State

type State struct {
	Name      string `json:"name"`
	ShortCode string `json:"short_code"`
}

type SymbolTicker

type SymbolTicker struct {
	DailyBar struct {
		C float64   `json:"c"`
		H float64   `json:"h"`
		L float64   `json:"l"`
		O float64   `json:"o"`
		T time.Time `json:"t"`
		V int       `json:"v"`
	} `json:"dailyBar"`
	LatestQuote struct {
		Ap int       `json:"ap"`
		As int       `json:"as"`
		Ax string    `json:"ax"`
		Bp int       `json:"bp"`
		Bs int       `json:"bs"`
		Bx string    `json:"bx"`
		C  []string  `json:"c"`
		T  time.Time `json:"t"`
	} `json:"latestQuote"`
	LatestTrade struct {
		C []string  `json:"c"`
		I int       `json:"i"`
		P float64   `json:"p"`
		S int       `json:"s"`
		T time.Time `json:"t"`
		X string    `json:"x"`
		Z string    `json:"z"`
	} `json:"latestTrade"`
	MinuteBar struct {
		C float64   `json:"c"`
		H float64   `json:"h"`
		L float64   `json:"l"`
		O float64   `json:"o"`
		T time.Time `json:"t"`
		V int       `json:"v"`
	} `json:"minuteBar"`
	PrevDailyBar struct {
		C int       `json:"c"`
		H float64   `json:"h"`
		L float64   `json:"l"`
		O float64   `json:"o"`
		T time.Time `json:"t"`
		V int       `json:"v"`
	} `json:"prevDailyBar"`
	Symbol string `json:"symbol"`
}

type Transfer

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

Auth represents auth http service

type User

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

User represents the user http service

type WatchList

type WatchList struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	AccountID string `json:"account_id"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
	Assets    []AssetsResponse
}

Jump to

Keyboard shortcuts

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