Closed memoryfraction closed 1 year ago
and how to get the cash balance for exchange Kraken using ccxt.net?
You can find in TradeApi, FetchOpenOrderAsync.
any function such as fetchBalance(), create_market_buy_order()?
found the solution for 2/3 of the questions. Here is the answer
[TestMethod]
public async Task Gemini_LoadMarketAsync_Should_Work()
{
var _public_api = new CCXT.NET.Gemini.Public.PublicApi();
var marketsRes = await _public_api.LoadMarketsAsync();
foreach (var item in marketsRes.result)
{
if (item.Key.Contains("BTC") && item.Key.Contains("USD"))
{
Console.WriteLine($"{item.Key}");
}
}
Console.WriteLine("---------");
foreach (var item in marketsRes.result)
{
if (item.Key.Contains("ETH") && item.Key.Contains("USD"))
{
Console.WriteLine($"{item.Key}");
}
}
}
[TestMethod]
public async Task Gemini_FetchTradesAsync_Should_Work()
{
var geminiApiKey = _configuration["Gemini:ApiKey"];
var exchangeSecret = _configuration["Gemini:Secret"];
var tradeApi = new CCXT.NET.Gemini.Trade.TradeApi(geminiApiKey, exchangeSecret);
var mytradesResponse = await tradeApi.FetchMyTradesAsync("BTC", "USD");
Assert.IsTrue(mytradesResponse.success == true);
}
However, I am still stucked when I create a market order. I did wrap the option in a string array, but still got the notice "the options parameter must be an array."
Can anyone help me out? Thanks
How to create a limit buy order using ccxt.net for exchange Kraken?