CCXT-readme-19.cs
· 465 B · C#
Ham
using ccxt; // importing ccxt
namespace Project;
class Project {
public async static Task CreateOrder() {
var exchange = new Binance();
exchange.apiKey = "my api key";
exchange.secret = "my secret";
// always use the capitalized method (CreateOrder instead of createOrder)
var order = await exchange.CreateOrder("BTC/USDT", "limit", "buy", 1, 50);
Console.WriteLine("Placed Order, order id: " + order.id);
}
}
1 | using ccxt; // importing ccxt |
2 | namespace Project; |
3 | class Project { |
4 | public async static Task CreateOrder() { |
5 | var exchange = new Binance(); |
6 | exchange.apiKey = "my api key"; |
7 | exchange.secret = "my secret"; |
8 | // always use the capitalized method (CreateOrder instead of createOrder) |
9 | var order = await exchange.CreateOrder("BTC/USDT", "limit", "buy", 1, 50); |
10 | Console.WriteLine("Placed Order, order id: " + order.id); |
11 | } |
12 | } |