Skip to content

Instantly share code, notes, and snippets.

@mikerodrigues
Last active August 29, 2015 14:26
Show Gist options
  • Save mikerodrigues/27f880806e917a879a3b to your computer and use it in GitHub Desktop.
Save mikerodrigues/27f880806e917a879a3b to your computer and use it in GitHub Desktop.
module Coinbase
module Exchange
class AsyncClientMock
def orderbook(options={})
{ bids: [['250.00', '1.00', 'abc123-abc123'],
['249.99', '0.30', 'efg456-efg456'],
['249.00', '21.0', 'hij789-hij789']
],
asks: [['250.01', '1.00', '123abc-123abc'],
['250.02', '0.50', '456-efg-456efg'],
['251.00', '32.00', '789hij-789hij']
],
sequence: "1"
}
end
end
end
end
module Coinbase
module Exchange
class WebsocketMock
def initialize(options={})
@options = options
end
def message(&block)
block.call(next_message)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment