mtgoxapi-0.5: Library to communicate with Mt.Gox

Safe HaskellNone

Network.MtGoxAPI.DepthStore

Synopsis

Documentation

simulateBTCSell :: DepthStoreHandle -> Integer -> IO DepthStoreAnswerSource

Simulate how much USD can be earned by selling the specified amount of BTC. The function will return NotEnoughDepth in case there is not enough depth to cover the full amount. If no recent data is available, it will return DepthStoreUnavailable. In the latter case it will have retried a few times before giving up. The function will not block for longer than about 20 seconds.

simulateBTCBuy :: DepthStoreHandle -> Integer -> IO DepthStoreAnswerSource

Simulate how much USD will be needed to buy the specified amount of BTC. See simulateBTCSell for more details.

simulateUSDSell :: DepthStoreHandle -> Integer -> IO DepthStoreAnswerSource

Simulate how much BTC can be earned by selling the specified amount of USD. See simulateBTCSell for more details.

simulateUSDBuy :: DepthStoreHandle -> Integer -> IO DepthStoreAnswerSource

Simulate how much BTC will be needed to buy the specified amount of USD. See simulateBTCSell for more details.