Bitcoin Forum
November 25, 2017, 04:29:18 AM *
News: Latest stable version of Bitcoin Core: 0.15.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [HOW-TO] Exchanges API  (Read 933 times)
nemgun
Hero Member
*****
Offline Offline

Activity: 490



View Profile
February 12, 2017, 05:07:46 PM
 #1

Hello Bitcointalk, i would like to announce you the creation of a repository who will host several tutorials and libraries in PHP and javascript, maybe other languages but i am not sure.

https://github.com/nemgun32/Exchange-API-Tutorial

So from here, i will try to answer to as much questions as i can, and create tutorials for API integration, usage, and interaction, i know that it may had aleready been done, but regarding the popular demand i guess that it will still help.
I don't think that i will cover the private API usage as someone is aleready doing it, but i will do my best for the other parts.

If you are looking for the same on NODEJS, you just need to find a way to do the calls, for the data handling it is exactly the same, i will do NODEJS tutorials when PHP is finished.

-Update:

Added more features to the classes.
Extended examples.
---------------------------
 Now using CURL
 More informations on pages
 Examples


        ▄                   ▄██
       ▐██▄                ▄████▄
       █████▄            ▄███████
      ████████▄        ▄██████████
     ▐██████████▄    ▄█████████████
     █████████████▄ ▀██████████████▄
    ████████████████▄ ▀█████████████
   ▐█████████████████▄  ▀████████████
   ████████████████████▄  ▀██████████▌
  ███████████████████████▄  ▀█████████▄
 ▄█████████████████████████▄  ▀████████
 ████████████████████████████▄  ▀██████▌
▐██████████████████████████████▄  ▀██▀▀
▀████████████████████████████████
    ▀▀▀███████████████████████▀
          ▀▀███████████████▀
                ▀▀█████▀▀
.
▄█▄


▀█▀
.
▄█▄


▀█▀
.
1511584158
Hero Member
*
Offline Offline

Posts: 1511584158

View Profile Personal Message (Offline)

Ignore
1511584158
Reply with quote  #2

1511584158
Report to moderator
1511584158
Hero Member
*
Offline Offline

Posts: 1511584158

View Profile Personal Message (Offline)

Ignore
1511584158
Reply with quote  #2

1511584158
Report to moderator
Join ICO Now Coinlancer is Disrupting the Freelance marketplace!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1511584158
Hero Member
*
Offline Offline

Posts: 1511584158

View Profile Personal Message (Offline)

Ignore
1511584158
Reply with quote  #2

1511584158
Report to moderator
1511584158
Hero Member
*
Offline Offline

Posts: 1511584158

View Profile Personal Message (Offline)

Ignore
1511584158
Reply with quote  #2

1511584158
Report to moderator
1511584158
Hero Member
*
Offline Offline

Posts: 1511584158

View Profile Personal Message (Offline)

Ignore
1511584158
Reply with quote  #2

1511584158
Report to moderator
Joel_Jantsen
Hero Member
*****
Offline Offline

Activity: 798


You heard of Nemesis ?


View Profile WWW
February 12, 2017, 07:02:54 PM
 #2

Appreciate the initiative but why limiting the Tutorials to only PHP ? And that is not exactly a tutorial but the actual code which I believe just works.Maybe you could explain the basics and such to know learners what exactly you're doing.

.BitDice.               ▄▄███▄▄
           ▄▄██▀▀ ▄ ▀▀██▄▄
      ▄▄█ ▀▀  ▄▄█████▄▄  ▀▀ █▄▄
  ▄▄██▀▀     ▀▀ █████ ▀▀     ▀▀██▄▄
██▀▀ ▄▄██▀      ▀███▀      ▀██▄▄ ▀▀██
██  ████▄▄       ███       ▄▄████  ██
██  █▀▀████▄▄  ▄█████▄  ▄▄████▀▀█  ██
██  ▀     ▀▀▀███████████▀▀▀     ▀  ██
             ███████████
██  ▄     ▄▄▄███████████▄▄▄     ▄  ██
██  █▄▄████▀▀  ▀█████▀  ▀▀████▄▄█  ██
██  ████▀▀       ███       ▀▀████  ██
██▄▄ ▀▀██▄      ▄███▄      ▄██▀▀ ▄▄██
  ▀▀██▄▄     ▄▄ █████ ▄▄     ▄▄██▀▀
      ▀▀█ ▄▄  ▀▀█████▀▀  ▄▄ █▀▀
           ▀▀██▄▄ ▀ ▄▄██▀▀
               ▀▀███▀▀
        ▄▄███████▄▄
     ▄███████████████▄
    ████▀▀       ▀▀████
   ████▀           ▀████
   ████             ████
   ████ ▄▄▄▄▄▄▄▄▄▄▄ ████
▄█████████████████████████▄
██████████▀▀▀▀▀▀▀██████████
████                   ████
████                   ████
████                   ████
████                   ████
████                   ████
████▄                 ▄████
████████▄▄▄     ▄▄▄████████
  ▀▀▀█████████████████▀▀▀
        ▀▀▀█████▀▀▀
▄▄████████████████████████████████▄▄
██████████████████████████████████████
█████                            █████
█████                            █████
█████                            █████
█████                            █████
█████                     ▄▄▄▄▄▄▄▄▄▄
█████                   ▄█▀▀▀▀▀▀▀▀▀▀█▄
█████                   ██          ██
█████                   ██          ██
█████                   ██          ██
██████████████████▀▀███ ██          ██
 ████████████████▄  ▄██ ██          ██
   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ██          ██
             ██████████ ██          ██
           ▄███████████ ██████▀▀██████
          █████████████  ▀████▄▄████▀
[/]
falala69
Sr. Member
****
Offline Offline

Activity: 248



View Profile
February 12, 2017, 07:17:55 PM
 #3

You could add more wrapper like node.js, python, go, ruby and explain their basic usage rather than just a code. Its more useful for anyone that still learning to code.

Here is lib that i used for trex (node.js): https://www.npmjs.com/package/node.bittrex.api and for polo, just simply make a request to their public api  Smiley
nemgun
Hero Member
*****
Offline Offline

Activity: 490



View Profile
February 12, 2017, 09:54:16 PM
 #4

i said in the OP that i will start with PHP as it is, well, it is PHP.
Then i will do for sure nodejs, javascript, perl, maybe bash, i don't want to stay only in PHP, i know that.
It is just the first release, expect the repo to change a lot, i am for now collecting informations, for example :

-Shall i group the informations by exchange or by language ?
- how about making a GH page.
- I will add more comments in codes.
- A wiki page may be better then just using Readme.

These are what i am thinking about, now for the code itself, i don't want to provide something too much advanced technically, it is a tutorial about how to get the data, and if someone needs the libraries, then he can pick them.
Making a fancy library who calls all the exchanges is not the objective, experienced uses don't even need to watch the repo as they aleready know how to do it.


        ▄                   ▄██
       ▐██▄                ▄████▄
       █████▄            ▄███████
      ████████▄        ▄██████████
     ▐██████████▄    ▄█████████████
     █████████████▄ ▀██████████████▄
    ████████████████▄ ▀█████████████
   ▐█████████████████▄  ▀████████████
   ████████████████████▄  ▀██████████▌
  ███████████████████████▄  ▀█████████▄
 ▄█████████████████████████▄  ▀████████
 ████████████████████████████▄  ▀██████▌
▐██████████████████████████████▄  ▀██▀▀
▀████████████████████████████████
    ▀▀▀███████████████████████▀
          ▀▀███████████████▀
                ▀▀█████▀▀
.
▄█▄


▀█▀
.
▄█▄


▀█▀
.
nemgun
Hero Member
*****
Offline Offline

Activity: 490



View Profile
February 15, 2017, 08:00:04 PM
 #5

Following the comments i added more details to the repo, plus now i use CURL instead of file_get_contents. Next i will add more exchanges, and as soon as there are enough exchanges i will add more libraries for other languages, i think that some of them will be more like tutorials instead of libraries.


        ▄                   ▄██
       ▐██▄                ▄████▄
       █████▄            ▄███████
      ████████▄        ▄██████████
     ▐██████████▄    ▄█████████████
     █████████████▄ ▀██████████████▄
    ████████████████▄ ▀█████████████
   ▐█████████████████▄  ▀████████████
   ████████████████████▄  ▀██████████▌
  ███████████████████████▄  ▀█████████▄
 ▄█████████████████████████▄  ▀████████
 ████████████████████████████▄  ▀██████▌
▐██████████████████████████████▄  ▀██▀▀
▀████████████████████████████████
    ▀▀▀███████████████████████▀
          ▀▀███████████████▀
                ▀▀█████▀▀
.
▄█▄


▀█▀
.
▄█▄


▀█▀
.
nemgun
Hero Member
*****
Offline Offline

Activity: 490



View Profile
February 23, 2017, 03:10:23 PM
 #6

Added more features to the classes.
Extended examples, note that some of them may be slow to execute depending on your bandwith as some exchanges have hundreds of pairs.

To do

Add support for Poloniex, Krakken, Bitfinex


        ▄                   ▄██
       ▐██▄                ▄████▄
       █████▄            ▄███████
      ████████▄        ▄██████████
     ▐██████████▄    ▄█████████████
     █████████████▄ ▀██████████████▄
    ████████████████▄ ▀█████████████
   ▐█████████████████▄  ▀████████████
   ████████████████████▄  ▀██████████▌
  ███████████████████████▄  ▀█████████▄
 ▄█████████████████████████▄  ▀████████
 ████████████████████████████▄  ▀██████▌
▐██████████████████████████████▄  ▀██▀▀
▀████████████████████████████████
    ▀▀▀███████████████████████▀
          ▀▀███████████████▀
                ▀▀█████▀▀
.
▄█▄


▀█▀
.
▄█▄


▀█▀
.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!