-
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.
Merge pull request #17 from fremantle-capital/struct-insufficient-bal…
…ance-error Return struct for insufficient balance error
- Loading branch information
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
fixture/vcr_cassettes/order_limit_buy_error_insufficient_balance.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,40 @@ | ||
[ | ||
{ | ||
"request": { | ||
"body": "price=0.001&quantity=10000&recvWindow=1000&side=BUY&symbol=LTCBTC&timeInForce=FOK×tamp=1528091845716&type=LIMIT&signature=***", | ||
"headers": { | ||
"X-MBX-APIKEY": "***" | ||
}, | ||
"method": "post", | ||
"options": [], | ||
"request_body": "", | ||
"url": "https://api.binance.com/api/v3/order" | ||
}, | ||
"response": { | ||
"binary": false, | ||
"body": "{\"code\":-2010,\"msg\":\"Account has insufficient balance for requested action.\"}", | ||
"headers": { | ||
"Content-Type": "application/json", | ||
"Transfer-Encoding": "chunked", | ||
"Connection": "keep-alive", | ||
"Date": "Mon, 04 Jun 2018 05:57:25 GMT", | ||
"Server": "nginx", | ||
"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": "Error from cloudfront", | ||
"Via": "1.1 a8a06e035420932f2808c2efee52f455.cloudfront.net (CloudFront)", | ||
"X-Amz-Cf-Id": "UF3P5hkV9dU_7OiQrz4RkgvAwZhaJy0AyTZDasjdwOyz0ax44Lhbdw==" | ||
}, | ||
"status_code": 400, | ||
"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
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,4 @@ | ||
defmodule Binance.InsufficientBalanceError do | ||
@enforce_keys [:reason] | ||
defstruct [:reason] | ||
end |
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