Git Product home page Git Product logo

bitfinex-rest's People

Contributors

jandrews377 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bitfinex-rest's Issues

Authenticated sample in C#

Hi there, (not a real issue) did you already manage to get some basic code in C# working for the authenticated endpoints? I'm trying to get it working, but the response keeps saying "invalid api key".

Thanks for your help!
J

getting trade history results in list with 0 elements

The code below results in an empty list, history.count = 0. I'm trying to retrieve the trade history between the start and end. Here I have limited the number of records to 120. I think the problem is the override specifies start and end as type int. In C# this defaults to int32. The number to be passed is actually int64 and is not specified correctly in the Bitfinex API documentation. UTC time codes are usually 1s resolution which would fit into an int32. The Trades command in the API specifies 1mS resolution which only fits into an int64. I have a working model of this command in C++ and have verified the documented 1mS resolution.

Your test suite does not test this method override. In general the test suite does not test all method overrides and therefore the testing is not thorough. I suggest a thorough test would have caught this problem. A secondary issue is whether the list is empty as a result of an exchange error. How do I catch the exchange error if an error is returned by the exchange?

These questions will become critical as you add authenticated commands to the package. Errors like "not enough funds in the account" are critical to catch when making trades.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Bitfinex;
using Bitfinex.Models;

namespace BitfinexV2RESTAPITest
{
	class Program
	{
		static void Main(string[] args)
		{
			List<ITrade> history = new List<ITrade>();
			var client = new BitfinexRestClient();

			history = client.GetTrades("tBTCUSD", 120, 1501105149000, 1501115149000);
			foreach (Bitfinex.Models.ITrade x1 in history.OrderBy(x1 => x1.MTS))
			{
				Console.WriteLine((x1.MTS).ToString() + " " + (x1.Price).ToString());
			}
		}
	}
}

.NET Core supported?

is it possible to support .net core?

I compiled this project myself and did same tests in Windows 7, but get this error message:

System.AggregateException
HResult=0x80131500
Message=One or more errors occurred. (Operation is not supported on this platform.)
Source=System.Private.CoreLib
StackTrace:
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Bitfinex.BitfinexRestClient.GetTickers(String[] symbols) in XXXX\bitfinex-rest-master\Bitfinex\TickersClient.cs:line 31
at ConsoleApp1.Program.Main(String[] args) in XXXXX\bitfinex-rest-master\ConsoleApp1\Program.cs:line 12

Exception: Operation is not supported on this platform.

any advice?

missing pairs

Hi, Just a little one.. The new pairs are not available in you Symbol enum.

Happy new year

System.AggregateException

System.AggregateException : System.Exception: (10020) symbol: invalid

Sometimes there is an System.AggregateException
code:
Bitfinex.BitfinexRestClient finex = new Bitfinex.BitfinexRestClient();
Bitfinex.IBitfinexRestClient finex2 = new Bitfinex.BitfinexRestClient();
string currency = "tETCBTC";
List<Bitfinex.Models.IBook> abc = null;
bool orderb = true;
while (orderb)
{
orderb = false;
try
{
abc = finex.GetBooks(currency, Bitfinex.Models.Precision.P0);
}
catch (AggregateException e)
{
Console.WriteLine(e.ToString());
orderb = true;
}
}

TradeResult

Confirm that the value for 'Period' that is returned is actually milliseconds.

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.