Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asgeir-s/bitfinex-data-collector
Collects data from Bitfinex and saves all trades + specified intervals in a Postgres database
https://github.com/asgeir-s/bitfinex-data-collector
bitcoin bitfinex timeseries
Last synced: 20 days ago
JSON representation
Collects data from Bitfinex and saves all trades + specified intervals in a Postgres database
- Host: GitHub
- URL: https://github.com/asgeir-s/bitfinex-data-collector
- Owner: asgeir-s
- Created: 2016-06-09T14:42:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-15T18:46:25.000Z (over 8 years ago)
- Last Synced: 2024-04-09T20:00:00.520Z (7 months ago)
- Topics: bitcoin, bitfinex, timeseries
- Language: Go
- Homepage:
- Size: 3.14 MB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Run in docker
1. setup docker
2. docker build -t btcdata .
3. docker run -e DB_HOST=192.168.99.100 --rm -t btcdata (DB_HOST should be set to the hosts IP)- set environment variables: -e VAR_TE=99
## Run in raw
1. go run main.go## Local Testing Setup
#### Manually creating test tick table (not for production)
psql -p 5432 -d timeseries -c "CREATE TABLE IF NOT EXISTS bitfinex_trade (id serial primary key, origin_id bigint, trade_time bigint NOT NULL, price numeric(10,3) NOT NULL, amount numeric(20,8) NOT NULL, trade_type varchar(5));"
psql -p 5432 -d timeseries -c "COPY bitfinex_trade(trade_time, price, amount) FROM '/Users/sogasg/Downloads/bitfinexUSD.csv' DELIMITER ',' CSV;"
#### Postgres
postgresql.conf
listen_addresses = '*'
pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
host all all 0.0.0.0/0 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication sogasg trust
#host replication sogasg 127.0.0.1/32 trust
#host replication sogasg ::1/128 trustWith problems: RESTART COMPUTER :P
## ToDo
- make sure only one instance is running at the time (make sure ticks do not duplucate)