MCPcopy Create free account
hub / github.com/ccxt/ccxt / parseTrade

Method parseTrade

ts/src/phemex.ts:1708–2005  ·  view source on GitHub ↗
(trade: Dict, market: Market = undefined)

Source from the content-addressed store, hash-verified

1706 }
1707
1708 parseTrade (trade: Dict, market: Market = undefined): Trade {
1709 //
1710 // fetchTrades (public) spot & contract
1711 //
1712 // [
1713 // 1592541746712239749,
1714 // 13156448570000,
1715 // "Buy",
1716 // 93070000,
1717 // 40173
1718 // ]
1719 //
1720 // fetchTrades (public) perp
1721 //
1722 // [
1723 // 1675690986063435800,
1724 // "Sell",
1725 // "22857.4",
1726 // "0.269"
1727 // ]
1728 //
1729 // fetchMyTrades (private)
1730 //
1731 // spot
1732 //
1733 // {
1734 // "qtyType": "ByQuote",
1735 // "transactTimeNs": 1589450974800550100,
1736 // "clOrdID": "8ba59d40-df25-d4b0-14cf-0703f44e9690",
1737 // "orderID": "b2b7018d-f02f-4c59-b4cf-051b9c2d2e83",
1738 // "symbol": "sBTCUSDT",
1739 // "side": "Buy",
1740 // "priceEP": 970056000000,
1741 // "baseQtyEv": 0,
1742 // "quoteQtyEv": 1000000000,
1743 // "action": "New",
1744 // "execStatus": "MakerFill",
1745 // "ordStatus": "Filled",
1746 // "ordType": "Limit",
1747 // "execInst": "None",
1748 // "timeInForce": "GoodTillCancel",
1749 // "stopDirection": "UNSPECIFIED",
1750 // "tradeType": "Trade",
1751 // "stopPxEp": 0,
1752 // "execId": "c6bd8979-07ba-5946-b07e-f8b65135dbb1",
1753 // "execPriceEp": 970056000000,
1754 // "execBaseQtyEv": 103000,
1755 // "execQuoteQtyEv": 999157680,
1756 // "leavesBaseQtyEv": 0,
1757 // "leavesQuoteQtyEv": 0,
1758 // "execFeeEv": 0,
1759 // "feeRateEr": 0
1760 // "baseCurrency": "BTC",
1761 // "quoteCurrency": "USDT",
1762 // "feeCurrency": "BTC"
1763 // }
1764 //
1765 // swap

Callers 1

handleMyTradesMethod · 0.95

Calls 15

fromEpMethod · 0.95
fromEvMethod · 0.95
parseOrderTypeMethod · 0.95
fromErMethod · 0.95
safeStringMethod · 0.45
safeMarketMethod · 0.45
isArrayMethod · 0.45
safeIntegerProductMethod · 0.45
safeStringLowerMethod · 0.45
safeIntegerMethod · 0.45
safeString2Method · 0.45
omitZeroMethod · 0.45

Tested by

no test coverage detected