-
-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend getTradeJournal
request by adding a status
filter
#721
Comments
Additionally, it helps to make more Example: I just want to fetch the |
Would that still work with pagination? |
|
{
"account": "8929712165307955075",
"accountRS": "TS-NFW5-WWDU-Y3BE-9P7VR",
"tradeJournal": [
{
"order": "12137482780163274653",
"asset": "6589512152275040401",
"account": "8929712165307955075",
"accountRS": "TS-NFW5-WWDU-Y3BE-9P7VR",
"quantityQNT": "100000",
"priceNQT": "30",
"height": 480139,
"name": "myonetoken",
"decimals": 1,
"price": "300",
"timestamp": 260371746,
"executedQuantityQNT": "0",
"executedVolumeNQT": "0",
"type": "bid",
"status": "cancelled",
"trades": []
},
{
"order": "2600843465838802073",
"asset": "15784340403242018732",
"account": "8929712165307955075",
"accountRS": "TS-NFW5-WWDU-Y3BE-9P7VR",
"quantityQNT": "15000000000",
"priceNQT": "250",
"height": 475416,
"name": "TK8",
"decimals": 8,
"price": "25000000000",
"timestamp": 259233220,
"executedQuantityQNT": "1737429816",
"executedVolumeNQT": "434357454000",
"type": "ask",
"status": "cancelled",
"trades": [
{
"timestamp": 259804495,
"quantityQNT": "1500000000",
"priceNQT": "250",
"asset": "15784340403242018732",
"askOrder": "2600843465838802073",
"bidOrder": "135389358966331573",
"askOrderHeight": 477791,
"seller": "8929712165307955075",
"sellerRS": "TS-NFW5-WWDU-Y3BE-9P7VR",
"buyer": "12892566484214586041",
"buyerRS": "TS-H8PT-X5HD-V5U4-DSWU7",
"block": "12446588116028768990",
"height": 477791,
"tradeType": "buy",
"price": "25000000000"
},
{
"timestamp": 259804495,
"quantityQNT": "237429816",
"priceNQT": "250",
"asset": "15784340403242018732",
"askOrder": "2600843465838802073",
"bidOrder": "2096241056156122884",
"askOrderHeight": 477791,
"seller": "8929712165307955075",
"sellerRS": "TS-NFW5-WWDU-Y3BE-9P7VR",
"buyer": "8629824288351884182",
"buyerRS": "TS-36WQ-GYQN-D856-9DUJH",
"block": "12446588116028768990",
"height": 477791,
"tradeType": "buy",
"price": "25000000000"
}
]
},
{
"order": "6981912161304512875",
"asset": "13868324881938171674",
"account": "8929712165307955075",
"accountRS": "TS-NFW5-WWDU-Y3BE-9P7VR",
"quantityQNT": "100000",
"priceNQT": "5400",
"height": 474787,
"name": "TEST",
"decimals": 4,
"price": "54000000",
"timestamp": 259082416,
"executedQuantityQNT": "0",
"executedVolumeNQT": "0",
"type": "bid",
"status": "cancelled",
"trades": []
},
{
"order": "6304692069553441032",
"asset": "13868324881938171674",
"account": "8929712165307955075",
"accountRS": "TS-NFW5-WWDU-Y3BE-9P7VR",
"quantityQNT": "250000",
"priceNQT": "5500",
"height": 474787,
"name": "TEST",
"decimals": 4,
"price": "55000000",
"timestamp": 259082479,
"executedQuantityQNT": "0",
"executedVolumeNQT": "0",
"type": "bid",
"status": "cancelled",
"trades": []
}
],
"nextIndex": 4,
"requestProcessingTime": 57
} |
The status is a computed value and not inside the database.... so,
thinking of a solution here... |
Motivation
While trying to show a summary of open orders in Signumswap i came up with an "accuracy" problem of fetching journal of trades for a given account. Due to some filtering limitations.
Proposal
The request
getTradeJournal
should have a new query string parameter calledstatus
which its purpose is just to filter the trades/orders returned by the API endpoint.The options for this query parameter will be limited to the following:
open
filled
cancelled
This query parameter should be optional
Example of how it would look like on API Docs:
The text was updated successfully, but these errors were encountered: