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

Method parse_trade

python/ccxt/phemex.py:1663–1945  ·  view source on GitHub ↗
(self, trade: dict, market: Market = None)

Source from the content-addressed store, hash-verified

1661 return self.parse_trades(trades, market, since, limit)
1662
1663 def parse_trade(self, trade: dict, market: Market = None) -> Trade:
1664 #
1665 # fetchTrades(public) spot & contract
1666 #
1667 # [
1668 # 1592541746712239749,
1669 # 13156448570000,
1670 # "Buy",
1671 # 93070000,
1672 # 40173
1673 # ]
1674 #
1675 # fetchTrades(public) perp
1676 #
1677 # [
1678 # 1675690986063435800,
1679 # "Sell",
1680 # "22857.4",
1681 # "0.269"
1682 # ]
1683 #
1684 # fetchMyTrades(private)
1685 #
1686 # spot
1687 #
1688 # {
1689 # "qtyType": "ByQuote",
1690 # "transactTimeNs": 1589450974800550100,
1691 # "clOrdID": "8ba59d40-df25-d4b0-14cf-0703f44e9690",
1692 # "orderID": "b2b7018d-f02f-4c59-b4cf-051b9c2d2e83",
1693 # "symbol": "sBTCUSDT",
1694 # "side": "Buy",
1695 # "priceEP": 970056000000,
1696 # "baseQtyEv": 0,
1697 # "quoteQtyEv": 1000000000,
1698 # "action": "New",
1699 # "execStatus": "MakerFill",
1700 # "ordStatus": "Filled",
1701 # "ordType": "Limit",
1702 # "execInst": "None",
1703 # "timeInForce": "GoodTillCancel",
1704 # "stopDirection": "UNSPECIFIED",
1705 # "tradeType": "Trade",
1706 # "stopPxEp": 0,
1707 # "execId": "c6bd8979-07ba-5946-b07e-f8b65135dbb1",
1708 # "execPriceEp": 970056000000,
1709 # "execBaseQtyEv": 103000,
1710 # "execQuoteQtyEv": 999157680,
1711 # "leavesBaseQtyEv": 0,
1712 # "leavesQuoteQtyEv": 0,
1713 # "execFeeEv": 0,
1714 # "feeRateEr": 0
1715 # "baseCurrency": "BTC",
1716 # "quoteCurrency": "USDT",
1717 # "feeCurrency": "BTC"
1718 # }
1719 #
1720 # swap

Callers

nothing calls this directly

Calls 15

from_epMethod · 0.95
from_evMethod · 0.95
parse_order_typeMethod · 0.95
from_erMethod · 0.95
safe_stringMethod · 0.80
safe_integer_productMethod · 0.80
safe_string_lowerMethod · 0.80
safe_integerMethod · 0.80
safe_string_2Method · 0.80
omit_zeroMethod · 0.80
safe_valueMethod · 0.80
safe_tradeMethod · 0.80

Tested by

no test coverage detected