Skip to main content

Trade

No description

type Trade implements Node {
id: ID!
deletedAt: Time
freqtradeTradeID: Int!
pair: String!
isOpen: Boolean!
openDate: Time!
closeDate: Time
orphanedAt: Time
openRate: Float!
closeRate: Float
amount: Float!
stakeAmount: Float!
profitAbs: Float!
profitRatio: Float!
sellReason: String
strategyName: String
timeframe: String
botID: ID!
createdAt: Time!
updatedAt: Time!
bot: Bot!
}

Fields​

Trade.id ● ID! non-null scalar​

Trade.deletedAt ● Time scalar​

Soft-delete timestamp. If set, record is considered deleted.

Trade.freqtradeTradeID ● Int! non-null scalar​

Original trade ID from freqtrade

Trade.pair ● String! non-null scalar​

Trading pair (BTC/USDT)

Trade.isOpen ● Boolean! non-null scalar​

Trade open status

Trade.openDate ● Time! non-null scalar​

Trade open time

Trade.closeDate ● Time scalar​

Trade close time

Trade.orphanedAt ● Time scalar​

When a bot container reset orphaned this open trade: Freqtrade no longer reports it. Null for every other trade.

Trade.openRate ● Float! non-null scalar​

Entry price. Unit: price, in the pair's quote currency.

Trade.closeRate ● Float scalar​

Exit price. Unit: price, in the pair's quote currency.

Trade.amount ● Float! non-null scalar​

Amount of coins

Trade.stakeAmount ● Float! non-null scalar​

Stake in base currency

Trade.profitAbs ● Float! non-null scalar​

Absolute profit

Trade.profitRatio ● Float! non-null scalar​

Profit relative to the stake (Freqtrade profit_ratio). Unit: fraction 0..1 (0.05 = 5%).

Trade.sellReason ● String scalar​

Reason for selling (roi, stoploss, etc.)

Trade.strategyName ● String scalar​

Strategy used

Trade.timeframe ● String scalar​

Timeframe used

Trade.botID ● ID! non-null scalar​

Foreign key to bot

Trade.createdAt ● Time! non-null scalar​

Trade.updatedAt ● Time! non-null scalar​

Trade.bot ● Bot! non-null object​

Interfaces​

Node interface​

An object with an ID. Follows the Relay Global Object Identification Specification

Returned By​

createTrade mutation ● tradeChanged subscription ● tradeUpdated subscription

Member Of​

TradeEdge object