manhinhang/ib-gateway-docker
소개
lightweight interactive brokers gateway docker
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalIB Gateway docker
lightweight interactive brokers gateway docker
It's just pure IB Gateway and don't include any VNC service (for security reason, I don't like expose extra port)
This docker image just installed:
IB Gateway Latest: 10.53.1b / Stable: 10.50.1i
IBC (3.24.2)
Pull the Docker image from Docker Hub
docker pull manhinhang/ib-gateway-docker
Create a container from the image and run it
docker run -d \
--env IB_ACCOUNT= \ #YOUR_USER_ID
--env IB_PASSWORD= \ #YOUR_PASSWORD
--env TRADING_MODE= \ #paper or live
-p 4002:4002 \ #brige IB gateway port to your local port 4002
manhinhang/ib-gateway-docker
Build & Run locally
git clone [email protected]:manhinhang/ib-gateway-docker.git
cd ib-gateway-docker
docker build --no-cache -t ib-gateway-docker .
docker run -d \
--env IB_ACCOUNT= \ #YOUR_USER_ID
--env IB_PASSWORD= \ #YOUR_PASSWORD
--env TRADING_MODE= \ #paper or live
-p 4002:4002 \ #brige IB gateway port to your local port 4002
ib-gateway-docker
Container usage example
| Example | Link | Description |
|---|---|---|
| ib_insync | examples/ib_insync | This example demonstrated how to connect IB Gateway |
Health check container
API
Healthcheck via api call http://localhost:8080/healthcheck
Config HEALTHCHECK_API_ENABLE=true in environment variable to enable API
curl -f http://localhost:8080/healthcheck
- Docker compose example
services:
ib-gateway:
image: manhinhang/ib-gateway-docker
ports:
- 4002:4002
environment:
- IB_ACCOUNT=$IB_ACCOUNT
- IB_PASSWORD=$IB_PASSWORD
- TRADING_MODE=$TRADING_MODE
- HEALTHCHECK_API_ENABLE=true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/healthcheck"]
interval: 60s
timeout: 30s
retries: 3
start_period: 60s
CLI
Execute healthcheck to detect IB gateway haelth status
healthcheck
# output: Ping IB Gateway successful
echo $?
# output: 0
healthcheck
# output: Can not connect to IB Gateway
echo $?
# output: 1
- Docker compose example
services:
ib-gateway:
image: manhinhang/ib-gateway-docker
ports:
- 4002:4002
environment:
- IB_ACCOUNT=$IB_ACCOUNT
- IB_PASSWORD=$IB_PASSWORD
- TRADING_MODE=$TRADING_MODE
healthcheck:
test: /healthcheck/bin/healthcheck
interval: 60s
timeout: 30s
retries: 3
start_period: 60s
Tests
The test cases written with testinfra.
Run the tests
pytest
Github Actions for continuous integration
After forking IB Gateway docker repository, you need config your interactive brokers paper account & password in github secret
| Key | Description |
|---|---|
| IB_ACCOUNT | your paper account name |
| IB_PASSWORD | your paper account password |
Disclaimer
This project is not affiliated with Interactive Brokers Group, Inc.'s.
Good luck and enjoy.
관련 프로젝트 살펴보기
불러오는 중…