Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: An open letter to MetaExchange  (Read 481 times)

Offline kaibakker

An open letter to MetaExchange
« on: March 18, 2015, 10:49:13 PM »

Dear people of MetaExchange,
First of all, i think MetaExchange is doing a great job in helping the BitShares platform by becoming our main gateway to and from our BitShares. It feels solid and works really well.

I am working on an website where I compare different Instant Cryptocurrecy exchanges, and tried to implement your api into my project. But i found it pretty hard to use your API first off all, sometimes you have to use POST sometimes GET, it isn't REST.
Second thing that struck me is the amount of parameters that I get back when I ask for the rates :
Code: [Select]
{"symbol_pair":"bitBTC_BTC","ask":"1.006","bid":"0.994","ask_max":"1","bid_max":"0.8","ask_fee_percent":"0","bid_fee_percent":"0","up":false,"btc_volume_24h":"0","last_price":"0","asset_name":null,"realised_spread_percent":"0","price_delta":"0","flipped":false}
Code: [Select]
url: shapeshift.io/rate/<pair>
method: GET
 
 => {
        "pair" : "btc_ltc",
        "rate" : "70.1234"
    }

If you are planning to do a API update ever in the future, have a look at the shapeshift API: https://shapeshift.io/api.html
Help the people that want to build upon your API. But you ofcourse you are busy with other stuff and understand if it doesn't have much priority. If you need some help I am a programmer, so maybe could do somethings myself.

But thanks for the already amazing service!

PS: And it would really help me if it was possible in the future to send to a bishares address in stead of a username.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 11962
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: An open letter to MetaExchange
« Reply #1 on: March 19, 2015, 06:46:33 AM »
paging @monsterer
I am sure that kind of input is much appreciated
+5%
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline monsterer

Re: An open letter to MetaExchange
« Reply #2 on: March 19, 2015, 08:06:35 AM »
The documentation does indicate which HTTP method each call is, but maybe this is not clear enough.

Also, there is no call just to get the rates, what you are referring to is /api/1/getMarket which gets all the summary details for a particular market, which contains the bid/ask prices among other things.

The reason for not having a single call just to get bid/ask, is that these are rarely useful by themselves - for example you might also want to know what the maximum amount you can buy/sell is in a single transaction. If I made them two different api calls, it's double the work for you.

Send to public key is something which is right on the top of my todo list :)
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline kaibakker

Re: An open letter to MetaExchange
« Reply #3 on: March 19, 2015, 08:33:12 AM »
Great to hear from you, I get that some extra information that you probably will need is useful, but I would like to know how much btc I get for my bts when I use the service.
ask_fee_percent, bid_fee_percent, asset_name, realised_spread_percent, price_delta

Now I have to think is this considers to be an ask of a bid action?
Then do something like ask*(1-ask_fee_percentage) is this my final rate?
Or do I have to do I have to do something with realised_spread_percentage and price_delta.
Maybe you documented it somewhere, but there is a good chance that the developers who implement your Api, make an mistake implementing it. And it would be nice if a developer wouldn't been forts to learn all you application logic.

It just feels confusing and I think Apis shouldn't me confusing.

And I understand that you are not going to change your api tomorrow, but I just want you to know how I felt implementing it, and that the hassle could slow down adoption of your Api.

Offline monsterer

Re: An open letter to MetaExchange
« Reply #4 on: March 19, 2015, 08:54:08 AM »
Great to hear from you, I get that some extra information that you probably will need is useful, but I would like to know how much btc I get for my bts when I use the service.
ask_fee_percent, bid_fee_percent, asset_name, realised_spread_percent, price_delta

Now I have to think is this considers to be an ask of a bid action?
Then do something like ask*(1-ask_fee_percentage) is this my final rate?

Ahhh, understood - yes, the conversion from bid/ask into rates is somewhat involved.

Here is the reference JS I use in metaexchange website itself (re-written slightly for you):

https://github.com/wildbunny/metaexchange/blob/master/js/Pages/main.js

Code: [Select]
var qa, qb;
if (data.flipped)
{
// flipped market means flipped order types as well
qa = parseFloat(data.bid);
qb = parseFloat(data.ask);
}
else
{
qa = 1 / parseFloat(data.ask);
qb = 1 / parseFloat(data.bid);
}

var buyFee = (qa * data.ask_fee_percent / 100.0);
var sellFee = (qb * data.bid_fee_percent / 100.0);

var buyQuantity = qa - buyFee;
var sellQuantity = qb + sellFee;

Hope that helps :)
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline kaibakker

Re: An open letter to MetaExchange
« Reply #5 on: March 19, 2015, 05:25:46 PM »
Thanks that helps a lot, maybe good to put something like that into your documentation as well

Offline monsterer

Re: An open letter to MetaExchange
« Reply #6 on: March 20, 2015, 10:36:39 AM »
Thanks that helps a lot, maybe good to put something like that into your documentation as well

I'll stick that on my todo :)
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline kaibakker

Re: An open letter to MetaExchange
« Reply #7 on: March 22, 2015, 05:24:00 PM »
Hey Monsterer,
Today I started implementing your api. Is there a rule for the directions your markets are in? alphabetical or something. Otherwise I have to store this information somewhere.
Is there a reason market information isn't to ways?
Thanks

Offline kaibakker

Re: An open letter to MetaExchange
« Reply #8 on: March 22, 2015, 05:33:47 PM »
And another question, when is flipped true?

 

Google+