How to use Tongdaxin l2 market interface?

Tongdaxin L2 market interface includes all the functions of the ordinary market interface, and adds four new functions: ten-level market, transaction, transaction queue, and Shenzhen transaction order (Shanghai Stock Exchange does not provide transaction-by-item data).

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;

namespace TdxHqApiDemo
{     class Program     {         static void Main(string[] args)         {             //DLL is 32-bit, so the target platform generated by the C# project must be changed from Any CPU to X86 to call the DLL; //TdxHqApi.dll must be copied to the project Debug             or Release directory; StringBuilder             Result = new StringBuilder(1024 * 102 4);             StringBuilder ErrInfo = new StringBuilder(256);







            bool bool1 = TdxL2Hq_Connect("61.152.107.173", 7707, Result, ErrInfo);
            if (!bool1)
            {
                Console.WriteLine(ErrInfo.ToString());
                return;
            }
        Console.WriteLine(Result.ToString());


            byte[] Market = { 0, 1, 1, 0 };
            string[] Zqdm = { "000001", "600030", "600000", "000750" };
            short Count = 4;
            bool1 = TdxL2Hq_GetSecurityQuotes10(Market, Zqdm, ref Count, Result, ErrInfo);

            if (bool1)
            {
                Console.WriteLine(Result.ToString());
            }
            else
            {
                Console.WriteLine(ErrInfo.ToString());
            }

            TdxL2Hq_Disconnect();
        }

A command-line tool is provided to realize simple interaction and function demonstration. After installation, you should be able to use the hqget command directly. hqget is divided into interactive mode and single-command mode. You can use hqget --help at any time to obtain the usage rules of Tongdaxin l2 market interface . Tongdaxin l2 market interface is relatively simple to use. If you want to know more about Tongdaxin l2 market interface, please contact the business card below.

Guess you like

Origin blog.csdn.net/Q_2037696191/article/details/127968902