wtospit / trading-watchdog-utility

Command line utility for monitoring trading activity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Trading watchdog utility

A console application which monitors treading activity in real-time and log suspicious behavior.

Trading servers can have some restrictions, some users can try to bypass these restrictions by using multiple accounts with different names (of some relatives for example) and on multiple servers. We need to detect such behavior in real-time. Check new deals and if two or more similar deals exist, log the information. Similar deals are deals where open time differs no more than one second, currency pair is the same and the difference in volume-to-balance ratio is no more than 5%. If such deals are detected log info including accounts and servers where the deals were detected.

Usage

Start new command line window with elevated privileges due to installation of performance counters.

watchdog --server 0.0.0.0 --login 1 --password userpassword --ratio 5 --delta 1 --verbose

or

watchdog -s 0.0.0.0 -l 1 -p userpassword -ratio 5 -delta 1 -verbose

Performance counters

Windows performance counters are used for collecting performance metrics. There are 2 Watchdog perfomance counters:

  • Deal events from API to process - Incoming deals queue counter

  • Deals to compare - Work queue counter

Development

Scaling up and down

Scaling is possible via increasing/decreasing instances of components in Watchdog.App/Startup.cs class.

variables:

  • ConsumersCount
  • WatchersCount

Workflow scheme

Watchdog app cheme

References

About

Command line utility for monitoring trading activity

License:MIT License


Languages

Language:C# 100.0%