diff options
author | David McMackins II <contact@mcmackins.org> | 2015-08-24 10:20:40 -0500 |
---|---|---|
committer | David McMackins II <contact@mcmackins.org> | 2015-08-24 10:20:40 -0500 |
commit | d54509fa7b231f96e7cdd659e007f84ae40ce159 (patch) | |
tree | de4de40649f2c476e4f15495bb3ec4bde2b812f3 | |
parent | 0e92f3000c5993b57c7b93e89f25b04a7dd89497 (diff) |
Added BTer plugin
-rw-r--r-- | plugins/bter.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/bter.py b/plugins/bter.py new file mode 100644 index 0000000..7a62368 --- /dev/null +++ b/plugins/bter.py @@ -0,0 +1,25 @@ +## +## coinfetch-api-bter - BTer API plugin for coinfetch +## Copyright (C) 2015 Delwink, LLC +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU Affero General Public License as published by +## the Free Software Foundation, version 3 only. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU Affero General Public License for more details. +## +## You should have received a copy of the GNU Affero General Public License +## along with this program. If not, see <http://www.gnu.org/licenses/>. +## + +from coinfetch import register_ticker, Ticker + +class BterTicker(Ticker): + def get_pair_data(self, response, pair=None): + return response.json() + +register_ticker('bter', 'The BTer ticker', + BterTicker('http://data.bter.com/api/1/ticker/')) |