Bitcoin Forum
May 09, 2024, 08:05:56 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Poloniex API for PHP  (Read 11171 times)
layoutph
Sr. Member
****
Offline Offline

Activity: 1386
Merit: 255


View Profile WWW
March 19, 2017, 12:05:49 PM
 #21

Hello OP great app, can you teach us how to use this script to make trade, either buy or sell. Do you have a sample uploaded script and demo it how it works.
1715285156
Hero Member
*
Offline Offline

Posts: 1715285156

View Profile Personal Message (Offline)

Ignore
1715285156
Reply with quote  #2

1715285156
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715285156
Hero Member
*
Offline Offline

Posts: 1715285156

View Profile Personal Message (Offline)

Ignore
1715285156
Reply with quote  #2

1715285156
Report to moderator
freemanjackal
Sr. Member
****
Offline Offline

Activity: 378
Merit: 250


View Profile
March 19, 2017, 05:16:26 PM
 #22

what you posted isnt working, and it is just showing information that should not be public cause can be used by any atacker to harm or shut down your site
It's a spam. See how old is the OG post.

He is talking about nickelbot i think, because the library itself will work unless poloniex changes their methods, even if so, one can just change it and it will work again, i made a library for poloniex but without Private API support, i had a look at it, and the one provided here is correct, so it will work.

If this one doesn't suits you, you can use the Poloniex-node-api.
sorry if there was a missunderstanding,yes  i am talking about nickelbot
kutato
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
April 04, 2017, 06:44:34 AM
Last edit: April 04, 2017, 07:07:30 AM by kutato
 #23

Hi
I try use Poloniex API to test some script but it always say some error like this. If I access link from browser it will stuck at security check. Is it wrong with my code Sad

Code:
echo file_get_contents("https://poloniex.com/public?command=return24hVolume");


PHP Warning:  file_get_contents(https://poloniex.com/public?command=return24hVolume): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden
nemgun
Hero Member
*****
Offline Offline

Activity: 882
Merit: 533



View Profile WWW
April 04, 2017, 12:33:08 PM
 #24

Hi
I try use Poloniex API to test some script but it always say some error like this. If I access link from browser it will stuck at security check. Is it wrong with my code Sad

Code:
echo file_get_contents("https://poloniex.com/public?command=return24hVolume");


PHP Warning:  file_get_contents(https://poloniex.com/public?command=return24hVolume): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden

The correct usage is :
Code: (php)
$url = "https://poloniex.com/public?command=return24hVolume";
$query = file_get_contents("https://poloniex.com/public?command=return24hVolume");
echo $query;

In your snipper you are asking to echo the function, always segment your code, don't try to use short codes as they are buggy, instead, declare variables and use them to work.

Now in order to use the informations you receive, do this :
Code: (php)
$url = "https://poloniex.com/public?command=return24hVolume";
$query = file_get_contents("https://poloniex.com/public?command=return24hVolume");
$info = json_decode($query); //now you can use the informations in php
echo $query;

Just remeber not to be lazy.
denza
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
May 30, 2017, 11:29:19 AM
 #25

Hy guys!
I can not get a response from the poloniex server.
Always at start I have an error. API key and Secret key in the script is installed.
I tried to work with the class presented in the Polonix documentation.
Help solve this problem.  Huh

Error:
File_get_contents (......................): failed to open stream: HTTP request failed! HTTP / 1.1 403 Forbidden
 
Example code:
 
Code:
require ("poloniex.php");
$polo = new Poloniex ($key, $secret);
$ticker = $polo-> returnTicker ();
print_r ($ticker);

This code also does not work:


Code:
$url = "https://poloniex.com/public?command=return24hVolume";
$query = file_get_contents("https://poloniex.com/public?command=return24hVolume");
$info = json_decode($query); //now you can use the informations in php
echo $query;

p.s. In the interface of the exchange, the API has a status that has never had any connections.
 
Thank you for your help!
nemgun
Hero Member
*****
Offline Offline

Activity: 882
Merit: 533



View Profile WWW
May 31, 2017, 02:31:13 PM
 #26

Hy guys!
I can not get a response from the poloniex server.
Always at start I have an error. API key and Secret key in the script is installed.
I tried to work with the class presented in the Polonix documentation.
Help solve this problem.  Huh

Error:
File_get_contents (......................): failed to open stream: HTTP request failed! HTTP / 1.1 403 Forbidden
 
Example code:
 
Code:
require ("poloniex.php");
$polo = new Poloniex ($key, $secret);
$ticker = $polo-> returnTicker ();
print_r ($ticker);

This code also does not work:


Code:
$url = "https://poloniex.com/public?command=return24hVolume";
$query = file_get_contents("https://poloniex.com/public?command=return24hVolume");
$info = json_decode($query); //now you can use the informations in php
echo $query;

p.s. In the interface of the exchange, the API has a status that has never had any connections.
 
Thank you for your help!



Can you try to echo it directly ?

Code:
$url = "https://poloniex.com/public?command=return24hVolume";
$query = file_get_contents("https://poloniex.com/public?command=return24hVolume");
//$info = json_decode($query); //now you can use the informations in php
echo $query;

And see the return, can you also tell me what is the version of php you are using ?
denza
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
June 01, 2017, 08:12:00 AM
 #27

Hy guys!
I can not get a response from the poloniex server.
Always at start I have an error. API key and Secret key in the script is installed.
I tried to work with the class presented in the Polonix documentation.
Help solve this problem.  Huh

Error:
File_get_contents (......................): failed to open stream: HTTP request failed! HTTP / 1.1 403 Forbidden
 
Example code:
 
Code:
require ("poloniex.php");
$polo = new Poloniex ($key, $secret);
$ticker = $polo-> returnTicker ();
print_r ($ticker);

This code also does not work:


Code:
$url = "https://poloniex.com/public?command=return24hVolume";
$query = file_get_contents("https://poloniex.com/public?command=return24hVolume");
$info = json_decode($query); //now you can use the informations in php
echo $query;

p.s. In the interface of the exchange, the API has a status that has never had any connections.
 
Thank you for your help!



Can you try to echo it directly ?

Code:
$url = "https://poloniex.com/public?command=return24hVolume";
$query = file_get_contents("https://poloniex.com/public?command=return24hVolume");
//$info = json_decode($query); //now you can use the informations in php
echo $query;

And see the return, can you also tell me what is the version of php you are using ?

Code started an error occurs:
Warning: file_get_contents(https://poloniex.com/public?command=return24hVolume): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden
PHP version 5.6

The error also occurs on the version of php 7.0
(((

Thanks for the help!

Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!