-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add immediate or cancel limit orders
- Loading branch information
Showing
3 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
fixture/vcr_cassettes/order_limit_buy_immediate_or_cancel_success.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[ | ||
{ | ||
"request": { | ||
"body": "price=0.01&quantity=0.1&recvWindow=1000&side=BUY&symbol=LTCBTC&timeInForce=IOC×tamp=1527291300666&type=LIMIT&signature=***", | ||
"headers": { | ||
"X-MBX-APIKEY": "***" | ||
}, | ||
"method": "post", | ||
"options": [], | ||
"request_body": "", | ||
"url": "https://api.binance.com/api/v3/order" | ||
}, | ||
"response": { | ||
"binary": false, | ||
"body": "{\"symbol\":\"LTCBTC\",\"orderId\":47528830,\"clientOrderId\":\"zyMyhtRENlvFHrl4CitDe0\",\"transactTime\":1527291300912,\"price\":\"0.01000000\",\"origQty\":\"0.10000000\",\"executedQty\":\"0.00000000\",\"status\":\"EXPIRED\",\"timeInForce\":\"IOC\",\"type\":\"LIMIT\",\"side\":\"BUY\"}", | ||
"headers": { | ||
"Content-Type": "application/json", | ||
"Transfer-Encoding": "chunked", | ||
"Connection": "keep-alive", | ||
"Date": "Fri, 25 May 2018 23:35:00 GMT", | ||
"Server": "nginx", | ||
"Vary": "Accept-Encoding", | ||
"Strict-Transport-Security": "max-age=31536000; includeSubdomains", | ||
"X-Frame-Options": "SAMEORIGIN", | ||
"X-Xss-Protection": "1; mode=block", | ||
"X-Content-Type-Options": "nosniff", | ||
"Content-Security-Policy": "default-src 'self'", | ||
"X-Content-Security-Policy": "default-src 'self'", | ||
"X-WebKit-CSP": "default-src 'self'", | ||
"Cache-Control": "no-cache, no-store, must-revalidate", | ||
"Pragma": "no-cache", | ||
"Expires": "0", | ||
"X-Cache": "Miss from cloudfront", | ||
"Via": "1.1 fb1574d5a6ba2d77d2a656aba08aa3c3.cloudfront.net (CloudFront)", | ||
"X-Amz-Cf-Id": "7FpRejCpXjYssWLkFBBSqvrIlcQQUmXaFGh4q1eFUpiWvRc91Ipo2g==" | ||
}, | ||
"status_code": 200, | ||
"type": "ok" | ||
} | ||
} | ||
] |
41 changes: 41 additions & 0 deletions
41
fixture/vcr_cassettes/order_limit_sell_immediate_or_cancel_success.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[ | ||
{ | ||
"request": { | ||
"body": "price=50000&quantity=0.001&recvWindow=1000&side=SELL&symbol=BTCUSDT&timeInForce=IOC×tamp=1527291410866&type=LIMIT&signature=***", | ||
"headers": { | ||
"X-MBX-APIKEY": "***" | ||
}, | ||
"method": "post", | ||
"options": [], | ||
"request_body": "", | ||
"url": "https://api.binance.com/api/v3/order" | ||
}, | ||
"response": { | ||
"binary": false, | ||
"body": "{\"symbol\":\"BTCUSDT\",\"orderId\":108279070,\"clientOrderId\":\"roSkLhwX9KCgYqr4yFPx1V\",\"transactTime\":1527291411088,\"price\":\"50000.00000000\",\"origQty\":\"0.00100000\",\"executedQty\":\"0.00000000\",\"status\":\"EXPIRED\",\"timeInForce\":\"IOC\",\"type\":\"LIMIT\",\"side\":\"SELL\"}", | ||
"headers": { | ||
"Content-Type": "application/json", | ||
"Transfer-Encoding": "chunked", | ||
"Connection": "keep-alive", | ||
"Date": "Fri, 25 May 2018 23:36:51 GMT", | ||
"Server": "nginx", | ||
"Vary": "Accept-Encoding", | ||
"Strict-Transport-Security": "max-age=31536000; includeSubdomains", | ||
"X-Frame-Options": "SAMEORIGIN", | ||
"X-Xss-Protection": "1; mode=block", | ||
"X-Content-Type-Options": "nosniff", | ||
"Content-Security-Policy": "default-src 'self'", | ||
"X-Content-Security-Policy": "default-src 'self'", | ||
"X-WebKit-CSP": "default-src 'self'", | ||
"Cache-Control": "no-cache, no-store, must-revalidate", | ||
"Pragma": "no-cache", | ||
"Expires": "0", | ||
"X-Cache": "Miss from cloudfront", | ||
"Via": "1.1 51f2e50a0d2a5ee1d9c830bf417b2713.cloudfront.net (CloudFront)", | ||
"X-Amz-Cf-Id": "BX8-X-VXYRrjfwPJ8H-Gx4sgVhcoBDZ7WlOiWn-u0SWuW2h0e5Rhpw==" | ||
}, | ||
"status_code": 200, | ||
"type": "ok" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters