add test for getting order and order cancellation transations

This commit is contained in:
Ivan Tivonenko
2015-07-16 22:16:50 +03:00
parent df21b9453f
commit 79b1a65a7b
6 changed files with 298 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
{
"type": "orderCancellation",
"address": "r9UHu5CWni1qRY7Q4CfFZLGvXo2pGQy96b",
"id": "809335DD3B0B333865096217AA2F55A4DF168E0198080B3A090D12D88880FF0E",
"sequence": 466,
"specification": {
"orderSequence": 465
},
"outcome": {
"result": "tesSUCCESS",
"timestamp": "2014-09-24T21:21:50.000Z",
"fee": "0.012",
"balanceChanges": {
"r9UHu5CWni1qRY7Q4CfFZLGvXo2pGQy96b": [
{
"currency": "XRP",
"value": "-0.012"
}
]
},
"orderbookChanges": {
"r9UHu5CWni1qRY7Q4CfFZLGvXo2pGQy96b": [
{
"taker_pays": {
"currency": "USD",
"counterparty": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"value": "0"
},
"taker_gets": {
"currency": "XRP",
"value": "0"
},
"sequence": 465,
"status": "canceled"
}
]
},
"ledgerVersion": 14661789,
"indexInLedger": 4
}
}

50
test/fixtures/responses/order.json vendored Normal file
View File

@@ -0,0 +1,50 @@
{
"type": "order",
"address": "r9UHu5CWni1qRY7Q4CfFZLGvXo2pGQy96b",
"id": "5D9B0B246255815B63983C188B4C23325B3544F605CDBE3004769EE9E990D2F2",
"sequence": 465,
"specification": {
"direction": "buy",
"quantity": {
"currency": "USD",
"value": "237",
"counterparty": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"
},
"totalPrice": {
"currency": "XRP",
"value": "0.0002"
}
},
"outcome": {
"result": "tesSUCCESS",
"timestamp": "2014-09-24T21:21:50.000Z",
"fee": "0.012",
"balanceChanges": {
"r9UHu5CWni1qRY7Q4CfFZLGvXo2pGQy96b": [
{
"currency": "XRP",
"value": "-0.012"
}
]
},
"orderbookChanges": {
"r9UHu5CWni1qRY7Q4CfFZLGvXo2pGQy96b": [
{
"taker_pays": {
"currency": "USD",
"counterparty": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
"value": "237"
},
"taker_gets": {
"currency": "XRP",
"value": "0.0002"
},
"sequence": 465,
"status": "created"
}
]
},
"ledgerVersion": 14661788,
"indexInLedger": 2
}
}