File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 1414--
1515-- Each one of the calls takes at least a 'BitXAuth' containing a previously-created API id and
1616-- secret (created by 'Network.Bitcoin.BitX.Private.Auth.authGrant', or created by visiting
17- -- <https://bitx.co/settings#/api_keys>), and may either return a
18- -- useful 'record', a 'BitXError' if BitX actually returned an error, or 'Nothing' if some exception
19- -- occured (or if the data returned by BitX was unparseable).
17+ -- <https://bitx.co/settings#/api_keys>), and will return a 'BitXAPIResponse'..
2018--
2119-- It would probably be best to create the 'BitXAuth' record using the constructor 'mkBitXAuth' and
2220-- lens setters:
Original file line number Diff line number Diff line change @@ -44,13 +44,13 @@ Creates a new withdrawal request.
4444newWithdrawalRequest :: BitXAuth -> NewWithdrawal -> IO (BitXAPIResponse WithdrawalRequest )
4545newWithdrawalRequest auth nwithd = simpleBitXPOSTAuth_ auth nwithd " withdrawals"
4646
47- {- | Get the status of a withdrawal request
47+ {- | Get the status of a withdrawal request by ID
4848
4949Returns the status of a particular withdrawal request.
5050
5151@Perm_R_Withdrawals@ permission required.-}
5252
53- getWithdrawalRequest :: BitXAuth -> Text -- ^ The withdrawal ID
53+ getWithdrawalRequest :: BitXAuth -> Text
5454 -> IO (BitXAPIResponse WithdrawalRequest )
5555getWithdrawalRequest auth wthid = simpleBitXGetAuth_ auth $ " withdrawals/" ++ Txt. unpack wthid
5656
Original file line number Diff line number Diff line change 1313-- As a small example, to get the current selling price of bitcoin on the BitX exchange, do the following:
1414--
1515-- @
16- -- {-# LANGUAGE DataKinds #-}
16+ -- {-\ # LANGUAGE DataKinds \ #-}
1717--
1818-- import Control.Lens ((^.))
1919-- import Network.Bitcoin.BitX (BitXAPIResponse(..), getTicker, CcyPair(..))
2828-- case bitXResponse of
2929-- ValidResponse tic -> print (tic ^. BitX.ask)
3030-- ErrorResponse err ->
31- -- error $ "BitX error received: \"" ++ unpack (err ^. BitX.error) ++ "\""
31+ -- error $ "BitX error received: \\ "" ++ unpack (err ^. BitX.error) ++ "\ \""
3232-- ExceptionResponse ex ->
33- -- error $ "Exception was thrown: \"" ++ unpack ex ++ "\""
33+ -- error $ "Exception was thrown: \\ "" ++ unpack ex ++ "\ \""
3434-- UnparseableResponse resp ->
35- -- error $ "Bad HTTP response; HTTP status code was: \"" ++ (show . statusCode . responseStatus $ resp) ++ "\""
35+ -- error $ "Bad HTTP response; HTTP status code was: \\ "" ++ (show . statusCode . responseStatus $ resp) ++ "\ \""
3636-- @
3737--
3838-----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments