Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asgeir-s/tb-streams
TradersBit microservice (deactivated)
https://github.com/asgeir-s/tb-streams
Last synced: 20 days ago
JSON representation
TradersBit microservice (deactivated)
- Host: GitHub
- URL: https://github.com/asgeir-s/tb-streams
- Owner: asgeir-s
- Created: 2015-05-21T16:27:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-22T08:54:02.000Z (over 8 years ago)
- Last Synced: 2024-04-09T20:00:01.061Z (7 months ago)
- Language: Scala
- Homepage: http://tradersbit.com
- Size: 15.3 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Streams Microservice
Microservice used in the tradersbit project.## Interface
POST: /streams {
"name": "Unique Name"
"exchange": "bitstamp",
"currencyPair": "btcUSD",
"payoutAddress": "publishers-bitcoin-address",
"subscriptionPriceUSD": 5
} returns => {"id": "someId", "apiKeyId": "someApiKeyId"}
POST: /streams/'streamID'/signals {
"timestamp": 1432122282747,
"price": 200.453,
"change": 0,
"id": 1,
"value": 100,
"signal": 1
}
## Environment Variables
SNS_SUBSCRIBERS (default '[]') (should be comma separated)
SIGNALS_SERVICE_PORT (default '80')
AWS_ACCESS_KEY_ID (default for env)
AWS_SECRET_KEY (default for env)
AWS_DYNAMO_STREAMS_TABLE_NAME (default 'none')
AWS_DYNAMO_REGION (default 'none')
SIGNALS_SERVICE_ADDRESS (default 'none')
LOG_LEVEL (default 'DEBUG')
AWS_LAMBDA_NOTIFY_EMAIL_ARN
SERVICE_APIKEY (default 'none')
MICROSERVICES_HTTPS (default 'false')
AWS_SNS_REGION (default 'none')optional(initialized for testing and automatically provided by AWS):
RDS_HOSTNAME
RDS_PORT
RDS_DB_NAME
RDS_USERNAME
RDS_PASSWORD
### Test Parameters
MICROSERVICES_HTTPS=false
SERVICE_APIKEY=secret
LOG_LEVEL=DEBUG
AWS_SECRET_KEY=PPwA9sj77iCb0iyaySTiQi7wVhUB13Iwv6pYUSrc
AWS_ACCESS_KEY_ID=AKIAJPBHJ6UH233F2KKA
SIGNALS_SERVICE_ADDRESS=tb-staging-signals.elasticbeanstalk.com
AWS_DYNAMO_STREAMS_TABLE_NAME=streams-test
AWS_DYNAMO_REGION=us-west-2
AWS_SNS_REGION=us-west-2
SNS_SUBSCRIBERS=[]
AWS_LAMBDA_NOTIFY_EMAIL_ARN=arn:aws:lambda:us-west-2:525932482084:function:tb-notify-email## OSX Set Up
##### Docker
Local if when runing docker: localhostOne time setup:
boot2docker init
VBoxManage modifyvm "boot2docker-vm" --natpf1 "postgres-port,tcp,127.0.0.1,5432,,5432" #osx specific bind (local) # set postgres to "listen on *" and "host all all 0.0.0.0/0 trust"Setup on each shell:
boot2docker start
eval "$(boot2docker shellinit)"##### Deployment
One time setup:
cd docker
eb init (then select environment etc...)## Makefile
-test
-test-u (unit)
-test-s (service)
-run-l (run local)
-build (builds a artifect and place it in the docker folder and afther that build the docker container)
-deploy-s (deploy on staging)
-test-s-s (service tests ageins staging)
-deploy-p (deploy in production)