Git Product home page Git Product logo

openctp / vitrader Goto Github PK

View Code? Open in Web Editor NEW
113.0 7.0 56.0 31.15 MB

ViTrader(原TextTrader),命令行交易终端(股票、期货、期权),绝大部分命令与VI编辑器中相同,支持CTP、openctp、华鑫证券、中泰证券等柜台,支持Windows、Linux、MacOS等操作系统。

License: BSD 3-Clause "New" or "Revised" License

C++ 46.02% C 53.88% Makefile 0.10%
ctp stocks futures quant trader options

vitrader's Introduction

ViTrader(原TextTrader)操作手册

1616771807(1)

简介

ViTrader是一款命令行交易客户端,操作命令基本同Vi编辑器,集交易与行情于一体,支持支持Windows、Linux、MacOS、FreeBSD等操作系统。

ViTrader支持CTP期货交易柜台,也支持采用CTP兼容接口的其它柜台(openctp)。

采用自动开平模式,不需要手动指定开平。

采用同图形界面的“One Click Order”点价下单模式,支持改单。

编译

Windows:

build/win32目录下,进入命令行执行nmake,或打开VS2019工程编译。

Linux:

build/linux目录下,执行make

MacOSX:

build/MacOSX目录下,执行make,或打开xcode工程编译。

安装包

已编译好Win32、Linux、Mac版本,绿色无需安装,如需要接入openctp、华鑫、中泰等柜台需要更换dll,各柜台CTPAPI的dll下载链接:CTPAPI下载

下载链接:ViTrader下载

移动命令(所有窗口通用):

  • ​ 上下左右:j、k、h、l及四个方向键
  • 翻页:f、b、u、d,支持上下翻页键,同时也支持^f、^b、^u、^d,即按住Control键
  • 上下行滚动:y、e,同时也支持^y、^e,即按住Control键
  • 屏幕顶部、中间、底部:H、M、L
  • 列表的开头、结尾:gg、G

选择合约:/

  • 主窗口及下单窗口下,按/键将在右下方显示合约选择窗口
  • 输入合约号,会自动匹配,按Enter键确认
  • 可按ESC键取消,其它见小窗口命令

调整列显示:v

  • 主窗口下按’v’键进入列调整窗口,可通过’j’、’k’键上下定位列,按空格键显示或取消显示列,按’+’、’-‘键调整列位置
  • 按ESC键返回主窗口

显示合约交易参数:空格

  • 主窗口下按空格键进入选定合约交易参数显示窗口
  • 按ESC键返回主窗口

小窗口命令:

  • 上下移动:^p、^n、方向键
  • 删除:^h 或者 BackSpace 都可以删除输入字符

窗口切换(支持F1~F9功能键,F2、F3暂保留):

  • 主窗口:1gt及F1
  • 下单窗口:Enter回车键、4gt、F4进入光标所在行的合约下单窗口
  • 持仓窗口:5gt、F5
  • 资金窗口:6gt、F6
  • 订单窗口:7gt、F7
  • 成交窗口:8gt、F8
  • 日志窗口:9gt、F9

下单操作:下单界面

  • 买卖方向选择:h、l及左右方向键,即左右移动到买/卖列
  • 价格选择:j、k及上下方向键及翻页键等,即上下移动相应价格格子
  • 下单:i(限价单),I(大写i为市价单)
  • 撤单:u(撤消所在格子的订单,同方向相同报价的所有订单都将被撤消)
  • 全部撤消:U(撤消当前商品的全部挂单)
  • 改单:x==>p(先将光标移动到订单位置,按x键,然后移动到新价格,再按p键即可,中间可按ESC键取消操作)
  • 反手(多空方向转换):r(以对手价反手)、R(以涨跌停价反手)

多次执行:

  • 一次向下移动多行:数值+j,如先按3,再按j,表示向下移动3行。
  • 一次下单N手:数值+i,如先按5,再按i,表示报入5手。
  • 大多数命令都可以这么用:数值+操作

QQ交流群:127235179

更多信息请关注公众号:

openctp公众号

vitrader's People

Contributors

krenx1983 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

vitrader's Issues

请教一下,编译成功了,运行报错

root@server:/TextTrader/build/linux# ls
Makefile TextTrader TextTrader.ini thostmduserapi_se.so thosttraderapi_se.so
root@server:/TextTrader/build/linux# ./TextTrader
./TextTrader: error while loading shared libraries: thostmduserapi_se.so: cannot open shared object file: No such file or directory
root@server:/TextTrader/build/linux# cd ../../Releases/Linux/
root@server:/TextTrader/Releases/Linux# ./TextTrader
./TextTrader: error while loading shared libraries: thostmduserapi_se.so: cannot open shared object file: No such file or directory
root@server:/TextTrader/Releases/Linux#

请教,是这样运行么, 这个错误怎么解决

Ubuntu 20.04环境无法编译

报错

g++ -std=c++11 -I. -I../../CTP -I../../INIReader -L/lib64 -L../.. -o TextTrader ../../TextTrader.cpp ../../INIReader/INIReader.cpp ../../INIReader/ini.c thostmduserapi_se.so thosttraderapi_se.so -lcurses -ltinfo
/usr/bin/ld: /tmp/cc6qE3LN.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.