Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/gbPublic

Simple trading grid bot.

License

NotificationsYou must be signed in to change notification settings

mcpcpc/gb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gb is a real-time, command-line grid trading bot written in C99. It adheres to the Suckless philosophy: simple, modular, and minimal. The bot reads price data from standard input and writes order fills and status updates to standard output. All state is in-memory, and configuration is passed via command-line flags. No sockets, no threads, no dependencies.

Features

  • Single static binary
  • No external libraries or socket connections
  • Fully pipeable: integrates with Unix tools or other processes
  • Designed for real-time use

Usage

Run:

./gb [options]

Price ticks are fed line-by-line through standard input, and order events are emitted through standard output.

For full command-line options and usage details, see:

man gb

Example:

$ echo -e "99\n100\n101" | ./gb -c 100 -l 3 -s 1 -q 0.5

Output:

TICK 1 @ 99.00Filled BUY 99.00 x 0.50TICK 2 @ 100.00TICK 3 @ 101.00Filled SELL 101.00 x 0.50

Build

make clean && make

Produces the./gb binary. Requires only a POSIX-compatible C compiler (e.g.,cc orclang).

Backtesting

Backtesting is not part of this binary and should be done externally (e.g., via Python withbacktesting.py).

Philosophy

  • No bloat. All logic lives in C99 source files under 500 lines.
  • No runtime configuration files or databases.
  • No sockets, threads, JSON, XML, or other overhead.
  • Everything viastdin /stdout.

About

Simple trading grid bot.

Topics

Resources

License

Stars

Watchers

Forks


[8]ページ先頭

©2009-2025 Movatter.jp