Listens to a BUX websocket and makes trades via the BUX API.
./gradlew bootRun
Make a POST to /trade with Content-Type: application/json
, like so:
{
"productId": "sb26493",
"buyPrice": 11700,
"lowerLimit": 11600,
"upperLimit": 11800
}
Runs on port 8090 by default. Supports multiple trades at once, one per productId (for simplicity).
Position will be opened if the current product price is between lower limit and buy price (buy price is treated as buy limit). Position will be closed if the current product price is either below lower limit or above upper limit.
- default - uses localhost:8080 BUX server
- beta - uses BUX beta environment API