Skip to content
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

Retrieving Orders produces a json array where BUY orders and SELL orders have a different record structure #107

Open
roberto-cisternino opened this issue Feb 7, 2024 · 3 comments

Comments

@roberto-cisternino
Copy link

Recently, when retrieving Orders using createTrade().getOrders(...),
the json array response produces a list of BUY orders and SELL orders with a different record structure.
This do not allow to create a table view correclty.

@roberto-cisternino
Copy link
Author

In this example a BUY order has 20 data fields while a SELL order has 22 fields:

{
"page": 1,
"records": 3,
"rows": [
{
"id": "0",
"td": [
"FXSUSDT",
444990091,
-1,
"5823008e-f0a9-44a8-ba25-cfea283fba67",
"0.00000000",
"5.20000000",
"5.20000000",
"49.46140000",
"FILLED",
"GTC",
"MARKET",
"BUY",
"0.00000000",
"0.00000000",
1707247597031,
1707247597031,
true,
1707247597031,
"50.00000000",
"EXPIRE_MAKER"
]
},
{
"id": "1",
"td": [
"FXSUSDT",
444997393,
-1,
"d3f6b93f-4216-46cd-9326-2a92511df2fe",
"0.00000000",
"5.20000000",
"5.20000000",
"49.17120000",
"FILLED",
"GTC",
"MARKET",
"BUY",
"0.00000000",
"0.00000000",
1707247845104,
1707247845104,
true,
1707247845104,
"50.00000000",
"EXPIRE_MAKER"
]
},
{
"id": "2",
"td": [
"FXSUSDT",
445007680,
-1,
"and_0c5d1385394341b4963640b29e107cc9",
"9.51700000",
"10.40000000",
"0.00000000",
"0.00000000",
"NEW",
"GTC",
"TAKE_PROFIT_LIMIT",
"SELL",
"0.00000000",
20,
1707248105709,
"0.00000000",
1707248105709,
1707248193727,
true,
1707248193727,
"0.00000000",
"EXPIRE_MAKER"
]
}
]
}

@aisling-2
Copy link
Contributor

@roberto-cisternino Can you specifically mention the additional fields?

@roberto-cisternino
Copy link
Author

Ok, let's compare the record with id=2 below (SELL), with the record with id=1 (BUY), just check the array "td":

SELL td has 22 items and starting with value 20 the record is different from the BUY record with id=1:

{
"id": "2",
"td": [
"FXSUSDT",
445007680,
-1,
"and_0c5d1385394341b4963640b29e107cc9",
"9.51700000",
"10.40000000",
"0.00000000",
"0.00000000",
"NEW",
"GTC",
"TAKE_PROFIT_LIMIT",
"SELL",
"0.00000000",
20,
1707248105709,
"0.00000000",
1707248105709,
1707248193727,
true,
1707248193727,
"0.00000000",
"EXPIRE_MAKER"
]
}

BUY td array has 20 items (two less then SELL item):

{
"id": "1",
"td": [
"FXSUSDT",
444997393,
-1,
"d3f6b93f-4216-46cd-9326-2a92511df2fe",
"0.00000000",
"5.20000000",
"5.20000000",
"49.17120000",
"FILLED",
"GTC",
"MARKET",
"BUY",
"0.00000000",
"0.00000000",
1707247845104,
1707247845104,
true,
1707247845104,
"50.00000000",
"EXPIRE_MAKER"
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants