-
Notifications
You must be signed in to change notification settings - Fork 0
/
rest.http
106 lines (91 loc) · 1.82 KB
/
rest.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
@server = http://localhost:3000
### health check
GET {{server}}/test
### getOperation
POST {{server}}
content-type: application/json
{
"jsonrpc": "2.0",
"method": "getOperation",
"params": ["1"],
"id": 1
}
### postOperation
POST {{server}}
content-type: application/json
{
"jsonrpc": "2.0",
"method": "postOperation",
"params": [{
"type": "TRANSFER",
"memo": "testing transfer API",
"entries": [
{
"bookId": "3",
"assetId": "btc",
"value": "-0.2"
},
{
"bookId": "2",
"assetId": "btc",
"value": "0.2"
}
]
}, false],
"id": 1
}
### postTransfer
POST {{server}}
content-type: application/json
{
"jsonrpc": "2.0",
"method": "postTransfer",
"params": [{
"fromBookId": "2",
"toBookId": "1",
"assetId": "btc",
"value": "0.2",
"memo": "testing transfer API",
"metadata": {"customTag": "customValue", "customTag2": "customValue2"}
}, true],
"id": 1
}
### getBook
POST {{server}}
content-type: application/json
{
"jsonrpc": "2.0",
"method": "getBook",
"params": ["1"],
"id": 1
}
### getBalances
POST {{server}}
content-type: application/json
{
"jsonrpc": "2.0",
"method": "getBalances",
"params": ["1", "btc", {"customTag": "customValue"}],
"id": 1
}
### getOperations
POST {{server}}
content-type: application/json
{
"jsonrpc": "2.0",
"method": "getOperations",
"params": ["1", {"customTag": "customValue"}],
"id": 1
}
### createBook
POST {{server}}
content-type: application/json
{
"jsonrpc": "2.0",
"method": "createBook",
"params": [{
"name": "coinswitch_cash",
"metadata": {}
}],
"id": 1
}