Nanoconda CLI
Nanoconda software can be run as a standalone distribution. This is achieved using the nanoconda-cli binary, which can execute various applications.
License File
A software license file is required to run nanoconda-cli on your machine. Please contact support@nanoconda.com if you need a license file.
Once you have the license file, set the NANOCONDA_LICENSE environment variable to its location:
OS Requirements
- RHEL-compatible system (Rocky Linux, CentOs, Red Hat Enterprice Linux)
- Huge Pages must be enabled.
- Write permissions must be enabled for
/dev/hugepages -
Following Libraries must be installed:
- libxml2:
sudo dnf install libxml2-devel - cryptopp:
sudo dnf install cryptopp-devel - libpcap:
sudo dnf install libpcap-devel
- libxml2:
UUID
Some applications are UUID locked, please make sure to run sudo chmod a+r /sys/class/dmi/id/product_uuid to allow read access to machine UUID.
CLI Help
Run nanoconda-cli --help to view available commands and options
NanoConda CLI - A command-line suite of applications for Direct Market Access
Usage:
nanoconda-cli -a APPNAME [OPTIONS]
Options:
-h Show this help message and exit.
-a APP Run the specified application.
-c CONFIG Supply configuration xml to an application.
-f FILE Supply file(s) to an application.
-i INPUT Supply an input to an application.
-m MASK Supply a MASK to an application.
-s Target a secondary session [cmeilink3].
APPLICATIONS (-a):
MARKET DATA:
CME MDP3.0:
cmemdp3 Consumes and normalizes CME MDP3 data from live NIC or PCAP.
Example: nanoconda-cli -a cmemdp3 -c cme-market-data-config.xml
cmebacktester Integrate your code as a plugin inline with feed handler, allows for fast PCAP backtesting.
Example: nanoconda-cli -a cmebacktester -i plugin.so -c cme-market-data-config.xml
cmesecdefreader Converts CME secdef.dat to Nanoconda product-file.
Example: ./nanoconda-cli -a cmesecdefreader -f secdef.dat -o myProductFile.naco
cmeproductsaver Generates a Nanoconda product-file from processing market data.
Example: nanoconda-cli -a cmeproductsaver -c cme-market-data-config.xml -o myProductFile.naco
DataBento DBN:
dbnbacktester Integrate your code as a plugin inline with feed handler, enabling fast backtesting from DBN files.
Example: nanoconda-cli -a dbnbacktester -i plugin.so -c dbn-playback.xml
dbnpublisher Consumes and normalizes DBN data to shared memory.
Example: nanoconda-cli -a dbnpublisher -c dbn-playback.xml
EXECUTION:
General:
simulator Starts a simulator where you can test your algo.
Example: nanoconda-cli -a simulator -c market-access-config.xml
guiserver Starts a GUI server when GUI is needed (if order session is run with --no-gui).
Example: nanoconda-cli -a guiserver -c market-access-config.xml
hashstring Hashes a string, such as password into a number that can be stored in configs.
Example: nanoconda-cli -a hashstring -i somestring
tradelogtocsv Generates a CSV file from Trade Log in shared memory.
Example: nanoconda-cli -a tradelogtocsv -c market-access-config.xml
Example: nanoconda-cli -a tradelogtocsv -f tradelogfile
tradelogclear Clears Trade Log in Shared Memory - Should be done daily, between session restarts.
Example: nanoconda-cli -a tradelogclear -c market-access-config.xml
tradelogstats Displays Trade Statistics from a Trade Log as a CSV, such as P&Ls and Trade counts.
Example: nanoconda-cli -a tradelogstats -c market-access-config.xml
Example: nanoconda-cli -a tradelogstats -f tradelogfile
latencyreport Displays Latency Report from a live Trading Session as a CSV.
Example: nanoconda-cli -a latencyreport -c market-access-config.xml
resetrisk Reset Risk Limits to XML configuration - Should only be done between session restarts.
Example: nanoconda-cli -a resetrisk -c market-access-config.xml
CME ILINK3.0
cmeilink3 Establishes an CME iLink3 session with the exchange.
Example: nanoconda-cli -a cmeilink3 -c cme-market-access-config.xml
cmepreregister Preregisters your application with CME Service Gateway. Output saved in a persist file.
Example: nanoconda-cli -a cmepreregister -c cme-market-access-config.xml
cmeaudittrail Converts binary audit file to CME CSV audit format.
Example: nanoconda-cli -a cmeaudittrail -f audittrailfile1.naco,audittrailfile2.naco > output-file.csv
cmepersistflush Persist file viewer and modified. Allows for viewing current values and resetting them.
*Persist Mask accepts 4 values (Example: 1111). Party Id, UUID, APP SeqNo, CME SeqNo.
Example: nanoconda-cli -a cmepersistflush -c cme-market-access-config.xml -m 1111
CLI Common Applications
nanoconda-cli is a versatile tool that allows for executing applications with various run-time options. Below are sample commands and XML files.
simulator
Simulator application could be used for testing your algo. Simulator subscribes to market data on speficied entitlements and executes orders based on that market data.
nanoconda-cli -a simulator -c simulator-session.xml
<Access logger="simulator-session.log" logger-level="debug" logger-cpu="1" dispatch-cpu="2"
environment="exchange"
account-id="useraccount1"
username="username1" passwordhash="5411718394350379800"
>
<Risk>
<Instrument symbol="ES" maxpositions="60" clipsize="10" />
<Instrument symbol="MES" maxpositions="600" clipsize="100" />
<Instrument symbol="NQ" maxpositions="200" clipsize="20" />
<Instrument symbol="MNQ" maxpositions="600" clipsize="100" />
<Instrument symbol="6E" maxpositions="200" clipsize="20" />
</Risk>
<Markets>
<Market code="XCME" />
</Markets>
<Gui intf="eth0" port="2345" cpu="5"/>
<Credentials>
<User login="user-trader" passwordhash="5411718394350379800" role="trader"/>
<User login="clearer" passwordhash="5411718394350379800" role="clearer"/>
<User login="user-viewer1" passwordhash="5411718394350379800" role="viewer"/>
<User login="user-viewer2" passwordhash="5421711394150379800" role="viewer"/>
</Credentials>
</Access>
tradelogtocsv
Reads trade log data from shared memory and converts it to CSV. Please supply same configuration file as the trading session.
hashstring
Passwords in XML are stored as hashed values for security. To set your password, please first hash it with this utility.