Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TradeEffect

Structure representing a Stellar Trade Effect.

Hierarchy

Index

Constructors

constructor

Properties

accountId

accountId: string

The account that originates the effect.

boughtAmount

boughtAmount: number

The amount of asset that was bought.

Optional boughtAssetCode

boughtAssetCode: string

The code for the bought asset. Appears if boughtAssetType is not native.

Optional boughtAssetIssuerId

boughtAssetIssuerId: string

The Stellar address of the bought asset’s issuer. Appears if boughtAssetType is not native.

boughtAssetType

boughtAssetType: string

The type of the bought asset. Either native, credit_alphanum4, or credit_alphanum12.

Readonly client

client: Client

createdAt

createdAt: Date

The effect's creation date.

createdTimestamp

createdTimestamp: number

The effect's creation timestamp.

id

id: string

The id of the effect.

offerId

offerId: string

The id of the offer.

pagingToken

pagingToken: string

A cursor value for use in pagination.

sellerId

sellerId: string

The id of the seller.

soldAmount

soldAmount: number

The amount of asset that was sold.

Optional soldAssetCode

soldAssetCode: string

The code for the sold asset. Appears if soldAssetType is not native.

Optional soldAssetIssuerId

soldAssetIssuerId: string

The Stellar address of the sold asset’s issuer. Appears if soldAssetType is not native.

soldAssetType

soldAssetType: string

The type of the sold asset. Either native, credit_alphanum4, or credit_alphanum12.

type

type: trade

The numeric type of the effect.

typeName

typeName: trade

The name of the effect type.

Methods

$patch

  • $patch(data: Trade): void

getAccount

  • getAccount(forceUpdate?: boolean): Promise<Account>

getBoughtAsset

  • getBoughtAsset(forceUpdate?: boolean): Promise<undefined | Asset>
  • Get the bought 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 bought asset instead.

    Returns Promise<undefined | Asset>

    The bought asset if it's not native.

getOffer

  • getOffer(forceUpdate?: boolean): Promise<Offer>

getSellerAccount

  • getSellerAccount(forceUpdate?: boolean): Promise<Account>

getSoldAsset

  • getSoldAsset(forceUpdate?: boolean): Promise<undefined | Asset>
  • Get the sold 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 sold asset instead.

    Returns Promise<undefined | Asset>

    The sold asset if it's not native.

Generated using TypeDoc