Options
All
  • Public
  • Public/Protected
  • All
Menu

Structure representing a Stellar Trade.

Hierarchy

  • Trade

Implements

Index

Constructors

constructor

Properties

baseAccountId

baseAccountId: string

The account id of the base party for the trade.

baseAmount

baseAmount: number

The amount of the base asset that was moved from baseAccount to counterAccount.

Optional baseAssetCode

baseAssetCode: string

The code for the base asset. Appears if baseAssetType is not native.

Optional baseAssetIssuerId

baseAssetIssuerId: string

The Stellar address of the base asset’s issuer. Appears if baseAssetType is not native.

baseAssetType

baseAssetType: string

The type for the base asset. Either native, credit_alphanum4, or credit_alphanum12.

baseIsSeller

baseIsSeller: boolean

Whether or not the base party is the seller.

baseOfferId

baseOfferId: string

The base offer id. If the offer was immediately and fully consumed, this will be a synethic id.

Readonly client

client: Client

counterAccountId

counterAccountId: string

The account id of the counter party for the trade.

counterAmount

counterAmount: number

The amount of the counter asset that was moved from counterAccount to baseAccount.

Optional counterAssetCode

counterAssetCode: string

The code for the counter asset. Appears if counterAssetType is not native.

Optional counterAssetIssuerId

counterAssetIssuerId: string

The Stellar address of the counter asset’s issuer. Appears if counterAssetType is not native.

counterAssetType

counterAssetType: string

The type for the counter asset. Either native, credit_alphanum4, or credit_alphanum12.

counterOfferId

counterOfferId: string

The counter offer id. If the offer was immediately and fully consumed, this will be a synethic id.

id

id: string

The id of the trade.

ledgerClosedAt

ledgerClosedAt: Date

The date when the ledger with the trade was closed.

ledgerClosedTimestamp

ledgerClosedTimestamp: number

The timestamp when the ledger with the trade was closed.

pagingToken

pagingToken: string

A cursor value for use in pagination.

price

A precise representation of the original offer price.

Methods

$patch

  • $patch(data: TradeRecord): void

getBaseAccount

  • getBaseAccount(forceUpdate?: boolean): Promise<Account>
  • Get the base account of the trade.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the base account instead.

    Returns Promise<Account>

    The base account.

getBaseAsset

  • getBaseAsset(forceUpdate?: boolean): Promise<undefined | Asset>
  • Get the base asset if it's not native.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the base asset instead.

    Returns Promise<undefined | Asset>

    The base asset if it's not native.

getBaseOffer

  • getBaseOffer(forceUpdate?: boolean): Promise<Offer>
  • Get the base offer of the trade.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the base offer instead.

    Returns Promise<Offer>

    The base offer.

getCounterAccount

  • getCounterAccount(forceUpdate?: boolean): Promise<Account>
  • Get the counter account of the trade.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the counter account instead.

    Returns Promise<Account>

    The counter account.

getCounterAsset

  • getCounterAsset(forceUpdate?: boolean): Promise<undefined | Asset>
  • Get the counter asset if it's not native.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the counter asset instead.

    Returns Promise<undefined | Asset>

    The counter asset if it's not native.

getCounterOffer

  • getCounterOffer(forceUpdate?: boolean): Promise<Offer>
  • Get the counter offer of the trade.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the counter offer instead.

    Returns Promise<Offer>

    The counter offer.

getOperation

  • getOperation(forceUpdate?: boolean): Promise<Operation<OperationResponseType, OperationResponseTypeI>>
  • Get the operation of the trade.

    Parameters

    • forceUpdate: boolean = false

      If set to true, it will not check in the cache and directly make a request to retrieve the operation instead.

    Returns Promise<Operation<OperationResponseType, OperationResponseTypeI>>

    The operation of the trade.

Generated using TypeDoc