语言: C#

git: https://github.com/jyoung80/csharp_BTC_Markets_Harness

用C#编写的线束,用于演示所有BTC Markets API函数的使用
A Harness written in C# to demonstrate the use of all the BTC Markets API functions
README.md (中文)


用C#编写的线束,用于演示所有BTC Markets API函数的使用。

此解决方案包含第三方Nuget包RestSharp以及NewtonSoft JSON。您需要添加这些以使用现有函数,但如果您重写Query函数以使用任何其他Request方法,那么您将能够成功连接帮助函数以签署字符串并生成时间戳。


要启动并运行该解决方案,请转至ApplicationConstants.cs文件,并更改可从BTC Markets页面访问的API KEY和PRIVATE KEY存储的值。

主代码块可以访问每个API函数注释掉,取消注释以测试每个函数(注意Create Order!)

对于CancelOrder和OrderDetail API函数,我只创建了函数来满足单个OrderID。我将尽力扩展它以满足OrderID的列表。

本文使用googletrans自动翻译,仅供参考, 原文来自github.com



A Harness written in C# to demonstrate the use of all the BTC Markets API functions.

This solution has the third party Nuget package RestSharp as well as NewtonSoft JSON included. You will need to add these to use the existing functions but if you rewrite the Query function to use any other Request method then you will be able to connect successfully with the helper functions for signing strings and generating the timestamps.

I have housed this sample in a Console application for demonstration purposes, feel free to refit to your purpose.

To get the solution up and running, go to the ApplicationConstants.cs file and change the values stored for API KEY and PRIVATE KEY that can be access from within the BTC Markets page.

The Main code block has each of the API functions accessible commented out, uncomment to test out each function (be careful with Create Order!)

For the CancelOrder and OrderDetail API functions I have only created functions to cater for a single OrderID. I will endeavour to extend this to cater for a list of OrderID's.