adapters

package
v0.18.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeatsToProto added in v0.12.0

func BeatsToProto(beats *tb.TickerBeats) *v1.TradeBeats

BeatsToProto transform tb.TickerBeats int v1.TickerBeats TODO: try to use proto.Marshal and Unmarshal

func DealToProto

func DealToProto(a *dea.Deal) *v1.Deal

DealToProto transform an dea.Deal model into an proto v1.Deal TODO: try to use proto.Marshal and Unmarshal

func DealsToProto

func DealsToProto(deals []*dea.Deal) []*v1.Deal

DealsToProto transform a list of deals model into a list of proto deals TODO: try to use proto.Marshal and Unmarshal

func OrderToProto

func OrderToProto(a *ord.Order) *v1.Order

OrderToProto transform an order model into an proto order TODO: try to use proto.Marshal and Unmarshal

func OrdersToProto

func OrdersToProto(orders []*ord.Order) []*v1.Order

OrdersToProto transform a list of orders model into a list of proto orders TODO: try to use proto.Marshal and Unmarshal

func PositionToProto

func PositionToProto(a *pos.Position) *v1.Position

PositionToProto transform an position model into an proto position TODO: try to use proto.Marshal and Unmarshal

func PositionsToProto

func PositionsToProto(positions []*pos.Position) []*v1.Position

PositionsToProto transform a list of positions model into a list of proto positions TODO: try to use proto.Marshal and Unmarshal

func ProtoToAccount

func ProtoToAccount(a *v1.Account) *acc.Account

ProtoToAccount transform an proto to an account model TODO: try to use proto.Marshal and Unmarshal

func ProtoToAccountInfo

func ProtoToAccountInfo(a *v1.Account) *acc.AccountInfo

ProtoToAccountInfo transform an proto to an account model TODO: try to use proto.Marshal and Unmarshal

func ProtoToDeal

func ProtoToDeal(a *v1.Deal) *dea.Deal

ProtoToDeal transform an proto to an deaount model TODO: try to use proto.Marshal and Unmarshal

func ProtoToOrder

func ProtoToOrder(a *v1.Order) *ord.Order

ProtoToOrder transform an proto to an order model TODO: try to use proto.Marshal and Unmarshal

func ProtoToPosition

func ProtoToPosition(a *v1.Position) *pos.Position

ProtoToPosition transform an proto to an position model TODO: try to use proto.Marshal and Unmarshal

func ProtoToTradeRequest

func ProtoToTradeRequest(accountID, creationOrder int64, a *v1.TradeRequest) *model.TradeRequest

ProtoToTradeTransaction transform an proto to an TradeTransaction model

func ProtoToTradeResult

func ProtoToTradeResult(accountID, creationOrder int64, a *v1.TradeResult) *model.TradeResult

ProtoToTradeTransaction transform an proto to an TradeTransaction model

func ProtoToTradeTransaction

func ProtoToTradeTransaction(accountID, creationOrder int64, a *v1.TradeTransaction) *model.TradeTransaction

ProtoToTradeTransaction transform an proto to an TradeTransaction model

func SignalToProto added in v0.9.2

func SignalToProto(s *sig.Signal) *v1.Signal

SignalToProto transform sig.Signal into v1.Signal TODO: try to use proto.Marshal and Unmarshal

func TradeRequestToProto added in v0.13.3

func TradeRequestToProto(a *model.TradeRequest) *v1.TradeRequest

ProtoToTradeTransaction transform an proto to an TradeTransaction model

Types

This section is empty.

Jump to

Keyboard shortcuts

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