Documentation ¶
Index ¶
- Constants
- func Authenticate(ctx context.Context, jwtToken string) (string, error)
- func CancelOrder(ctx context.Context, order *engine.Order) error
- func CancelOrderAction(ctx context.Context, orderId string, createdAt time.Time, userId string) error
- func CreateOrderAction(ctx context.Context, o *engine.Order, userId string, createdAt time.Time) error
- func CreateRefundTransfer(ctx context.Context, userId, assetId string, amount number.Decimal, ...) error
- func ExpireTransfers(ctx context.Context, transfers []*Transfer) error
- func ReadProperty(ctx context.Context, key string) (string, error)
- func ReadPropertyAsTime(ctx context.Context, key string) (time.Time, error)
- func SetupSpanner(ctx context.Context, client *spanner.Client) context.Context
- func Spanner(ctx context.Context) *spanner.Client
- func Transact(ctx context.Context, taker, maker *engine.Order, amount, funds number.Integer) (string, error)
- func UpdateUserPublicKey(ctx context.Context, userId, publicKey string) error
- func WriteProperty(ctx context.Context, key, value string) error
- func WriteTimeProperty(ctx context.Context, key string, value time.Time) error
- type Action
- type Order
- type Property
- type Trade
- type Transfer
- type User
Constants ¶
View Source
const ( OrderStatePending = "PENDING" OrderStateDone = "DONE" )
View Source
const ( MakerFeeRate = "0.000" TakerFeeRate = "0.001" TradeLiquidityTaker = "TAKER" TradeLiquidityMaker = "MAKER" )
View Source
const ( TransferSourceTradeConfirmed = "TRADE_CONFIRMED" TransferSourceOrderCancelled = "ORDER_CANCELLED" TransferSourceOrderFilled = "ORDER_FILLED" TransferSourceOrderInvalid = "ORDER_INVALID" )
Variables ¶
This section is empty.
Functions ¶
func CancelOrderAction ¶
func CreateOrderAction ¶
func CreateRefundTransfer ¶
func ReadPropertyAsTime ¶
func UpdateUserPublicKey ¶
Types ¶
type Action ¶
type Order ¶
type Order struct { OrderId string `spanner:"order_id"` OrderType string `spanner:"order_type"` QuoteAssetId string `spanner:"quote_asset_id"` BaseAssetId string `spanner:"base_asset_id"` Side string `spanner:"side"` Price string `spanner:"price"` RemainingAmount string `spanner:"remaining_amount"` FilledAmount string `spanner:"filled_amount"` RemainingFunds string `spanner:"remaining_funds"` FilledFunds string `spanner:"filled_funds"` CreatedAt time.Time `spanner:"created_at"` State string `spanner:"state"` UserId string `spanner:"user_id"` }
type Trade ¶
type Trade struct { TradeId string `spanner:"trade_id"` Liquidity string `spanner:"liquidity"` AskOrderId string `spanner:"ask_order_id"` BidOrderId string `spanner:"bid_order_id"` QuoteAssetId string `spanner:"quote_asset_id"` BaseAssetId string `spanner:"base_asset_id"` Side string `spanner:"side"` Price string `spanner:"price"` Amount string `spanner:"amount"` CreatedAt time.Time `spanner:"created_at"` UserId string `spanner:"user_id"` FeeAssetId string `spanner:"fee_asset_id"` FeeAmount string `spanner:"fee_amount"` }
func MarketTrades ¶
Click to show internal directories.
Click to hide internal directories.