Unofficial library to communicate with MercadoBitcoin API
- Source code: https://github.com/murilobsd/c-mercadobitcoin
- Bug reports: https://github.com/murilobsd/c-mercadobitcoin/issues
- OS: OpenBSD, Linux
PLEASE DO NOT USE
Before installing the library has dependencies:
git clone https://github.com/murilobsd/c-mercadobitcoin.git mb
cd mb
Build lib:
make
Build example:
make example
#include <stdio.h>
#include <mb/mb.h>
int
main(int argc, char *argv[])
{
FreeApi *f = freeapi_init();
Sticker *st;
f->ops->ticker(f, BTC);
if (f->ops->get_error(f) != MBE_OK) {
fprintf(stderr, "Error: %s\n", mb_get_strerro(f);
return (1);
}
st = (Sticker *)f->ops->get_data(f);
printf("=========== Ticker ============\n");
printf("High: %f\n", st->high);
printf("Low: %f\n", st->low);
printf("Vol: %f\n", st->vol);
printf("Last: %f\n", st->last);
printf("Buy: %f\n", st->buy);
printf("Sell: %f\n", st->sell);
printf("Date: %u\n", st->date);
printf("===============================\n");
clean_freeapi(f);
return (0);
}
and build
cc ticker.c -o ticker -lmbc
./ticker
Free Api:
Method | Status | Test |
---|---|---|
ticker | Implementing | - |
orderbook | - | - |
trades | - | - |
day-summary | - | - |
Language | Repo |
---|---|
Python | https://github.com/alfakini/python-mercadobitcoin |
Javascript | https://github.com/marcbarbosa/mercadobitcoin |
PHP | https://github.com/diegoBSousa/mercadobitcoin-php-api |