Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/b/t/btcx-HEAD/btcx/btce.py   btcx(Download)
    def _handle_trades(self, data, url):
        for trade in reversed(data): # Return from older to most recent.
            trade = common.Trade(trade['tid'], trade['date'],
                                 trade['trade_type'][0],
                                 Decimal(str(trade['price'])),

src/b/t/btcx-HEAD/btcx/btcchina.py   btcx(Download)
    def _handle_trades(self, data, url):
        # A list of trades. Each item contains date, price, amount, tid.
        for item in data:
            trade = common.Trade(int(item['tid']), int(item['date']), '',
                                 Decimal(str(item['price'])),

src/b/t/btcx-HEAD/btcx/bitstamp.py   btcx(Download)
    def _handle_transactions(self, data, url, **kwargs):
        for item in reversed(data): # From oldest to newest.
            trade = common.Trade(item['tid'], int(item['date']), '',
                                 Decimal(item['price']),
                                 Decimal(item['amount']))