purefinance / mmb Goto Github PK
View Code? Open in Web Editor NEWTrading bot implemented in Rust, with market making and strategy automation for any exchange or blockchain.
License: GNU General Public License v3.0
Trading bot implemented in Rust, with market making and strategy automation for any exchange or blockchain.
License: GNU General Public License v3.0
How is this configured for market making? If I am correct glancing through the code this is a trading engine as you highlight it, but it lacks the market making logic itself.
Enable automated cargo test
via Github Actions.
Possibly related to PR #140
To reproduce:
$ cargo build --release
$ cargo test --release
Output of cargo test --release
:
...
Compiling mmb_rpc v0.1.0 (/Users/jgarzik/repo/purefinance/mmb/mmb_rpc)
Compiling core_tests v0.1.0 (/Users/jgarzik/repo/purefinance/mmb/core_tests)
Compiling example v0.1.0 (/Users/jgarzik/repo/purefinance/mmb/example)
Compiling binance v0.1.0 (/Users/jgarzik/repo/purefinance/mmb/exchanges/binance)
Compiling semver-parser v0.10.2
error[E0599]: no method named `get_specific_currency_pair` found for struct `Arc<mmb_core::core::exchanges::general::exchange::Exchange>` in the current scope
--> exchanges/binance/tests/binance/binance_builder.rs:126:22
|
126 | exchange.get_specific_currency_pair(OrderProxy::default_currency_pair()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `Arc<mmb_core::core::exchanges::general::exchange::Exchange>`
error[E0599]: no method named `get_specific_currency_pair` found for struct `dashmap::mapref::one::Ref<'_, mmb_core::core::exchanges::common::ExchangeAccountId, Arc<mmb_core::core::exchanges::general::exchange::Exchange>>` in the current scope
--> exchanges/binance/tests/control_panel/statistics.rs:134:22
|
134 | exchange.get_specific_currency_pair(test_currency_pair),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `dashmap::mapref::one::Ref<'_, mmb_core::core::exchanges::common::ExchangeAccountId, Arc<mmb_core::core::exchanges::general::exchange::Exchange>>`
For more information about this error, try `rustc --explain E0599`.
error: could not compile `binance` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
As title states, trying to understand why websocket has two different channels (/core/src/connectivity/websocket.rs)
pub struct WsSender {
/// Main websocket connection sender
main_sender: mpsc::UnboundedSender<Message>,
/// Secondary websocket connection sender
secondary_sender: Option<mpsc::UnboundedSender<Message>>,
/// Cancellation token for service futures
_cancel: CancellationTokenDropGuard,
}
Is one for hotpath data such as trades/orderbook updates and the secondary one for intra service communication, trigger callback etc?
Hi,
I can see Serum connector still is flagged as yellow, where can I read about the issues or challenges ?
Thanks.
Testing with cargo test
passes.
Testing with cargo test --release
fails.
OS: MacOS
Platform:
$ rustc --version
rustc 1.50.0 (cb75ad5db 2021-02-10)
test core::exchanges::exchange_blocker::tests::block_with_first_long_handler ... ok
test core::exchanges::exchange_blocker::tests::block_duration ... ok
test core::exchanges::exchange_blocker::tests::reblock_before_time_is_up ... ok
test core::exchanges::exchange_blocker::tests::block_many_times_with_stop_exchange_blocker ... FAILED
test core::connectivity::connectivity_manager::tests::should_connect_and_reconnect_normally ... ok
test core::connectivity::websocket_actor::tests::connect_and_send_msg ... ok
failures:
---- core::exchanges::exchange_blocker::tests::block_many_times_with_stop_exchange_blocker stdout ----
thread 'core::exchanges::exchange_blocker::tests::block_many_times_with_stop_exchange_blocker' panicked at 'Timeout was exceeded (2000 ms)', src/core/exchanges/exchange_blocker.rs:1147:39
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
core::exchanges::exchange_blocker::tests::block_many_times_with_stop_exchange_blocker
test result: FAILED. 44 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.74s
error: test failed, to rerun pass '--lib'
I found the error when parsing message below in process_snapshot_update function I thinks you miss that.
"{"stream":"bnbusdt@depth20@100ms","data":{"lastUpdateId":8193113657,"bids":[["261.90000000","307.95300000"],["261.80000000","183.24100000"],["261.70000000","277.19900000"],["261.60000000","312.09600000"],["261.50000000","212.37300000"],["261.40000000","358.77600000"],["261.30000000","151.94600000"],["261.20000000","212.75500000"],["261.10000000","55.23900000"],["261.00000000","43.52300000"],["260.90000000","398.35900000"],["260.80000000","42.61500000"],["260.70000000","13.45200000"],["260.60000000","12.45600000"],["260.50000000","309.97400000"],["260.40000000","213.23200000"],["260.30000000","22.78500000"],["260.20000000","200.26200000"],["260.10000000","93.08900000"],["260.00000000","244.36900000"]],"asks":[["262.00000000","148.62600000"],["262.10000000","410.42700000"],["262.20000000","364.45100000"],["262.30000000","203.41100000"],["262.40000000","217.99700000"],["262.50000000","240.78200000"],["262.60000000","152.49000000"],["262.70000000","85.76200000"],["262.80000000","88.35300000"],["262.90000000","139.17200000"],["263.00000000","573.59400000"],["263.10000000","99.32500000"],["263.20000000","144.94100000"],["263.30000000","23.32800000"],["263.40000000","868.97000000"],["263.50000000","483.51100000"],["263.60000000","24.43900000"],["263.70000000","45.46600000"],["263.80000000","86.88300000"],["263.90000000","49.03600000"]]}}"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.