trades

package
v0.0.0-...-6daa909 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Common infrastructure for testing Trades

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTestAccount

func GetTestAccount() xdr.AccountId

Get generates and returns an account on the fly

func GetTestAsset

func GetTestAsset(code string) xdr.Asset

GetTestAsset generates an issuer on the fly and creates a CreditAlphanum4 Asset with given code

func IngestTestTrade

func IngestTestTrade(
	q *history.Q,
	assetSold xdr.Asset,
	assetBought xdr.Asset,
	seller xdr.AccountId,
	buyer xdr.AccountId,
	amountSold int64,
	amountBought int64,
	timestamp time.Millis,
	opCounter int64) error

IngestTestTrade mock ingests a trade

func PopulateTestTrades

func PopulateTestTrades(
	q *history.Q,
	startTs int64,
	numOfTrades int,
	delta int64,
	opStart int64) (ass1 xdr.Asset, ass2 xdr.Asset, err error)

PopulateTestTrades generates and ingests trades between two assets according to given parameters

Types

This section is empty.

Jump to

Keyboard shortcuts

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