Bitcoin Forum
May 24, 2024, 08:17:29 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 [3] 4 »
41  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][ICO] BANKERA - the Bank for the Blockchain Era on: September 30, 2017, 11:29:25 AM
I could not find much info about this hot ICO. I want to buy some token in ICO so when can I do that? I have just gone to the spectrocoin site but I cant find how to buy??
42  Alternate cryptocurrencies / Announcements (Altcoins) / Re: [ANN][BCC] Bitconnect Coin - Decentralized Cryptocurrency on: September 11, 2017, 07:15:11 PM
In my own opinion and knowledge ,bitconnect is a ponzi scheme. But look at it, 3000% raised from beginning. It means if someone invest $1000 to buy when it launched, he should have $3 000 000 at the moment right? Getting rich so easy??? Is it easy to buy and sell bitconnect?? Does it have any limit or condition in buy/sell/withdraw ?
43  Alternate cryptocurrencies / Altcoin Discussion / Bitconnect should be a Ponzi scheme but why does it raise so much? on: September 11, 2017, 06:46:45 PM
As we know Bitconnect BCC is a scam coin (ponzi scheme) but the price was raised 3000% since it launched. What if someone buy $1000 at beginning, he should have $3000 000 at the moment right? So scam coin still makes you rich easily? It makes me fell something wrong.
Anyone can tell me BCC was listed on which exchanges? And can I trade with it like other altcoins? Thanks in advance.
44  Alternate cryptocurrencies / Service Discussion (Altcoins) / Re: Is there a good dump/pump prediction group on Facebook or Telegram? on: September 02, 2017, 10:10:28 AM
Thank you all for your helpful advices. So I will stop looking for those groups, I will start learning trading and collect infos from forums/social media.
45  Alternate cryptocurrencies / Service Discussion (Altcoins) / Is there a good dump/pump prediction group on Facebook or Telegram? on: September 02, 2017, 12:48:36 AM
As mentioned above, I want to know if there is a group that predict incoming dump or pump coin, even if they charge a joining fee. I see a lot of good prediction that actually happended, that made me really surprised. Thanks.
46  Bitcoin / Project Development / Need help: Building a custom function for Google spreadsheet to Copy/Paste Value on: July 21, 2017, 04:03:54 PM
Hi,
I'm building a function to get Value from another cell. It will work this way:
At cell A1, I place function = copyValue(B1) or = copyValue(1 , 2) so that custom function will return the value of B1.
Here is my code:
Quote
function copyValue(int a,b) {
  var ss = SpreadsheetApp.openById('1HTEuyd7po43VKM37nmzCvPgLEVESgcN5YpAu2VRTiFI');
  var sheet =  ss.getSheetByName("Total");
  var cell = sheet.getRange(a,b);
  var c = cell.getValue();
  return(c);
}

But when I run, it said:
Quote
Missing ) after formal parameters. (line 1)

if I remove "int" before the formal params, it said I cannot getRange NULL.
Please help me to fix this. Thanks
47  Economy / Exchanges / Re: Need help (and ready to pay): Building Poloniex trading tool on: July 18, 2017, 05:36:43 AM
I dont want to use menu bcos I want sheet to place buy/sell command auto based on other cell value. With menu I can only do it manually.
So I have an idea to do that,
When the command place a BUY/SELL order succesfully, we will assign amount, date, total, rate to variables, let say a,b,c,d. Then we set other condition to write those variables back to the sheet "output". It means we dont setValue for "output" directly from other cell, the script did it. How do you think?
**Try the last time to help me on those probs to know how far we can do. And if we cant do any thing more, just tell me I will try other way to use this code. Anyway, I had a quite good result. THanks
48  Economy / Exchanges / Re: Need help (and ready to pay): Building Poloniex trading tool on: July 18, 2017, 04:41:12 AM
When I try to write trade data to sheet "output", it says: You dont have permission to setValue

And I found this: https://stackoverflow.com/questions/15933019/google-script-setvalue-permission

They said we can not setValue for a cell from a function placed in other cell.

Can we have another way for that?

**When I try to cancel an existed order, it said "Invalid command". I dont knw why?
49  Economy / Exchanges / Re: Need help (and ready to pay): Building Poloniex trading tool on: July 18, 2017, 02:32:06 AM
I have made a try with your code and it seems to work bcos there is no "Too long header" error. But when I place a buy order it said: TypeError: Cannot read property "0.01" from undefined. (line 77). (Line 77:        return dataAll[parameter][subparam] }; They said the Rate is not defined.

That error is just because it is attempting to parse the return JSON from Poloniex incorrectly...

Quote
 if (parameter === undefined) {
    Logger.log(JSON.stringify(dataAll))
    return JSON.stringify(dataAll) }
  else if(parameter != undefined && subparam === undefined) {
    return dataAll[parameter] }
  else if (parameter != undefined && subparam != undefined) {
    return dataAll[parameter][subparam] }
  }

This code is assuming that the "parameter" and/or "subparam" that you pass into the poloniex() function is one of the keys that comes back in the JSON return string from Poloniex... however, the example output that the API docs give for a "buy" command is:

{"orderNumber":31226040,"resultingTrades":[{"amount":"338.8732","date":"2014-10-18 23:03:21","rate":"0.00000173","total":"0.00058625","tradeID":"16164","type":"buy"}]}
So the "keys" are "orderNumber" and "resultingTrades"... resultingTrades has subkeys of "amount","date","rate","total","tradeID" and "type".

What has likely happened is that your BUY order has probably been placed, but your script just failed to read the result from Poloniex... as it was trying to find a key called ["BTC_ZEC"] with subkey ["0.01"] which won't exist. Check your poloniex order history and see if it got placed.

To fix the error, you'd need to put in some code that returns something that SHOULD be returned by a successful API "buy" call... Also, you should probably put some error checking in that checks to see if the API response was an error code:
Code:
  if (dataAll["error"] != undefined) {
    //oh oh, something went wrong!
    Logger.log("Error: " + dataAll["error"]);
    return dataAll["error"];
  }
  if (parameter === undefined) {
    Logger.log(JSON.stringify(dataAll));
    return JSON.stringify(dataAll);
  } else if (command === "buy") {
    return dataAll["orderNumber"];
  } else if(parameter != undefined && subparam === undefined) {
    return dataAll[parameter];
  } else if (parameter != undefined && subparam != undefined) {
    return dataAll[parameter][subparam];
  }
I'm not sure what data from the response you actually want to display, so I just picked the "orderNumber"...



Quote
And I did not see you add more one params in the poloniex function (still has 3 params but we are sending 4?)
Instead of using the "named" parameters (command,parameter,subparam) listed in the function definition... I just used arguments[0], arguments[1], arguments[2], arguments[3]... and check that the "command" is "buy", so therefore there should be 4 "arguments" (0,1,2 and 3) passed in to the function.

Wowwww it really works, thank you a lot!!!!!
But It only returns order number. Can we fix it to show other details? It will be very useful if it can show amount that was accept, rate, total and date, one by one in a single cell.
I have done the same with SELL,
**Also, what about CANCEL an order with an order number?
50  Economy / Exchanges / Re: Need help (and ready to pay): Building Poloniex trading tool on: July 17, 2017, 11:32:24 PM
I have made a try with your code and it seems to work bcos there is no "Too long header" error. But when I place a buy order it said: TypeError: Cannot read property "0.01" from undefined. (line 77). (Line 77:        return dataAll[parameter][subparam] }; They said the Rate is not defined.
And I did not see you add more one params in the poloniex function (still has 3 params but we are sending 4?)
**For the prob with sheet recalculation you pointed out, I will use the function with some conditional function in the sheet so I think I can control.
51  Economy / Exchanges / Re: Need help with Poloniex API (buy/sell command errors) on: July 17, 2017, 01:53:47 PM
Can you please provide the value of variable payloadEncoded.

Also it will be helpful to put the following

Code:
var req = UrlFetchApp.getRequest(url, params) 
before calling  UrlFetchApp.fetch(uri, params); and to provide the value of variable req


I dont know much about google script so I made some changes but it does not work. Can you edit the code directly and make some experiments of the spreadsheet? I can send you the spread sheet with the code embled so you can try.
52  Economy / Exchanges / Re: Need help: Building Poloniex trading tool and buy/sell command error on: July 17, 2017, 08:45:55 AM
It's hard to see where the appropriate values are being set... ie. "currencyPair", "rate", and "amount". Have you tried debugging the value of payloadEncoded? As this would appear to be where the values for the "currencyPair", "rate" and "amount" values are being set (I assume from cells in the spreadsheet? Huh):

Code:
var payloadEncoded = Object.keys(payload).map(function(param) {
            return encodeURIComponent(param) + '=' +      encodeURIComponent(payload[param]);
          }).join('&');

Can you dump the value of payloadEncoded to the console and make sure that your parameters are actually being included properly...

Also, your "poloniex" function only takes 3 parameters... but you're sending 4? Huh

function poloniex(command,parameter,subparam)
vs
=poloniex("buy","BTC_ZEC",0.01,2)
Thank you for your advice. But honestly I am not really good at script, so can you help me to get this run? I would love to pay you fee for that.
53  Economy / Exchanges / Re: Need help with Poloniex API (buy/sell command errors) on: July 16, 2017, 03:33:16 PM
1) Your function call poloniex("buy","USDT_ZEC",100,0.01) includes 4 arguments, your function poloniex(command,parameter,subparam) only accepts 3.

2) Your function poloniex doesn't actually do anything with the arguments you receive. You're only sending the command parameter (and the nonce), no currency pair, rate or total. You need to add those to the payload object.

I tried to add those to the payload, but it even cannot run. Can you help me to get this run? I will be very happy to send you money just to say thank. (If you offer a service to do that, pls give me the price Smiley ).

Try the following (code changes in green):

Quote
// work in progress

// you need a poloniex API key and secret with trading option enabled
// you can test it with:
// = poloniex ("returnBalances","BTC")
// or
// = poloniex ("returnBalances")


function poloniex(command,options) {
      
  // I assume that all the keys are in the "keys" spreadsheet. The key is in cell A1 and the secret in cell A2
      
  var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("keys");
  
  var key = sheet.getRange("A1").getValue();
    
  var secret = sheet.getRange("A2").getValue();

  var nonce = 1495932972127042 + new Date().getTime();
    
 var payload = options || {};
  payload.nonce = nonce;
  payload.command = command;

  
  
  var payloadEncoded = Object.keys(payload).map(function(param) {
    return encodeURIComponent(param) + '=' + encodeURIComponent(payload[param]);
  }).join('&');
    
  var uri = "https://poloniex.com/tradingApi";

  var signature = Utilities.computeHmacSignature(Utilities.MacAlgorithm.HMAC_SHA_512, payloadEncoded, secret);
    
  var stringSignature = "";
  
  for (i = 0; i < signature.length; i++) {
    var byte = signature;
    if (byte < 0)
      byte += 256;
    var byteStr = byte.toString(16);
    if (byteStr.length == 1) byteStr = '0'+byteStr;
    stringSignature += byteStr;
   }
    
  var headers = {
    "key": key,
    "sign": stringSignature
  }
  
  var params = {
    "method": "post",
    "headers": headers,
    "payload": payloadEncoded
  }
  
  var response = UrlFetchApp.fetch(uri, params);
  
  var dataAll = JSON.parse(response.getContentText());
  
 //Edited
  return JSON.stringify(dataAll) }
  //end edited

}

Note that you now have to call buy, sell, differently.

eg. you should now be able to call buy like this:

Code:
poloniex("buy", {
  currencyPair: "USDT_ZEC",
  amount: 100,
  rate: 0.01
});

The parameter names within the object {} correspond directly to the expected poloniex API POST parameters.

I haven't actually run it, but send me a PM if it works and you feel like tipping me.

When I run your code, it said: Limit Exceeded: URLFetch header size. (line 57, file "Code")
(Line 57: var response = UrlFetchApp.fetch(uri, params); )
Can you give me your email, I will share the sample spreadsheet with script embled so you can easily help me to fix it?
**I also want to process buy/sell command by placing a function in a cell inside the Spreadsheet (not a function in the script). Can I do that?
Honestly, I dont master in this so certainly I will really appreciate your help with an amount of btc. Thanks
54  Alternate cryptocurrencies / Service Announcements (Altcoins) / Re: 🔥🔥🔥🔥🔥[GUNBOT] Automatic Poloniex Profit Generator🔥🔥🔥🔥🔥 on: July 16, 2017, 01:04:38 PM
The dev was very smart when he let resellers get in. That's why good reviews are everywhere, some resellers even claim that they earn 5% per day at least, some others fake proof of earning accounts. So in my opinion, most of positive comments/reviews come from resellers/seeders. If you dont change your strategy, your software will soon be untrustworthy bcos of too many greedy resellers.
PS: Before reading so many suspicious reviews I was going to buy Gunbot, and for me, profit 1% per day is very good to invest. So gunthar pls take action to make your software to be a serious product (if it really be) instead of some kiddy stuff that resold by some stupid/geeedy resellers. Thanks

with you being a newbie AND non-user of the product - you would say that ...

with me / us being a veteran in the crypto industry AND using the product - i can assure you that you are completely wrong ...

resellers can promote the bot - because they KNOW it works ... if you are stupid with ANY bot - then you will lose ... if you are careful and invest wisely ... you can win ...

ALL bots do what you ask them to do ... so be wise when you set your bot up - IF you ever get into it ...

i / we are NOT resellers of gunbot - so any figures that is displayed from our account - are real with no fake crap to promote the bot ... in fact - 5% is actually conservative if you look at a 30 day schedule ... nothing is guranteed - and NOTHING gets done unless YOU do it right ... so LEARN the product back to front - and USE the product wisely ...

if not - you will come back here and slag the bot for losses that YOU made the bot do - because you were not diligent enough to learn what you were doing ...

resellers will always promote their sales ... so what? ... if they LIE - thats different ... gunthar should drop them as soon as that happens - and never deal with them again ... but so far - the 1-5% figures are reasonably accurate for those that KNOW how to manipulate the bot in the right way ...

try it out - and THEN talk ... i did - and now two other colleagues want the bot also ...

#crysx
thank you for your advice. So if I want to buy, which seller I should buy from?
55  Alternate cryptocurrencies / Service Announcements (Altcoins) / Re: 🔥🔥🔥🔥🔥[GUNBOT] Automatic Poloniex Profit Generator🔥🔥🔥🔥🔥 on: July 16, 2017, 04:03:42 AM
The dev was very smart when he let resellers get in. That's why good reviews are everywhere, some resellers even claim that they earn 5% per day at least, some others fake proof of earning accounts. So in my opinion, most of positive comments/reviews come from resellers/seeders. If you dont change your strategy, your software will soon be untrustworthy bcos of too many greedy resellers.
PS: Before reading so many suspicious reviews I was going to buy Gunbot, and for me, profit 1% per day is very good to invest. So gunthar pls take action to make your software to be a serious product (if it really be) instead of some kiddy stuff that resold by some stupid/geeedy resellers. Thanks
56  Economy / Exchanges / Re: Need help with Poloniex API (buy/sell command errors) on: July 16, 2017, 01:38:55 AM
1) Your function call poloniex("buy","USDT_ZEC",100,0.01) includes 4 arguments, your function poloniex(command,parameter,subparam) only accepts 3.

2) Your function poloniex doesn't actually do anything with the arguments you receive. You're only sending the command parameter (and the nonce), no currency pair, rate or total. You need to add those to the payload object.

I tried to add those to the payload, but it even cannot run. Can you help me to get this run? I will be very happy to send you money just to say thank. (If you offer a service to do that, pls give me the price Smiley ).
57  Economy / Exchanges / Re: Need help with Poloniex API (buy/sell command errors) on: July 16, 2017, 01:24:57 AM
Thank you all for your helps!
58  Economy / Exchanges / Re: Need help: Building Poloniex trading tool and buy/sell command error on: July 16, 2017, 01:15:54 AM
Maybe I have made  wrong post. Pls help me to delete it if I did
59  Economy / Exchanges / Need help (and ready to pay): Building Poloniex trading tool on: July 16, 2017, 01:07:37 AM
I used Google Apps Script and Spreadsheet to build a trading tool on Poloniex via its API. Everything seems to run well but the buy/sell command. Whenever I place an order by placing function =poloniex("buy","BTC_ZEC",0.01,2) at a cell in the sheet the API returns
Quote
Request failed for https://poloniex.com/tradingApi returned code 422.
Truncated server response: {"error":"Total must be at least 0.0001."}


All other command like get balances, deposit address...work well.
Please give me some suggestion to address this issue. Thanks a lot!
P/S: When I check the log, it said: error: Invalid command.
My code:
Quote
       // work in progress

        // you need a poloniex API key and secret with trading option enabled
        // you can test it with:
        // = poloniex ("returnBalances","BTC")
        // or
        // = poloniex ("returnBalances")


        function poloniex(command,parameter,subparam) {
      
          // I assume that all the keys are in the "keys" spreadsheet. The key         is in cell A1 and the secret in cell A2
      
          var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("keys");
  
          var key = sheet.getRange("A1").getValue();
    
          var secret = sheet.getRange("A2").getValue();

          var nonce = 1495932972127042 + new Date().getTime();
    
          var payload = {
            "nonce": nonce,
            "command": command
          }
  
          var payloadEncoded = Object.keys(payload).map(function(param) {
            return encodeURIComponent(param) + '=' +      encodeURIComponent(payload[param]);
          }).join('&');
    
          var uri = "https://poloniex.com/tradingApi";

          var signature =         Utilities.computeHmacSignature(Utilities.MacAlgorithm.HMAC_SHA_512, payloadEncoded, secret);
    
          var stringSignature = "";
  
          for (i = 0; i < signature.length; i++) {
            var byte = signature;
            if (byte < 0)
              byte += 256;
            var byteStr = byte.toString(16);
            if (byteStr.length == 1) byteStr = '0'+byteStr;
    stringSignature += byteStr;
           }
    
          var headers = {
            "key": key,
            "sign": stringSignature
          }
  
          var params = {
            "method": "post",
            "headers": headers,
            "payload": payloadEncoded
          }
  
          var response = UrlFetchApp.fetch(uri, params);
  
          var dataAll = JSON.parse(response.getContentText());
  
          if (parameter === undefined) {
    Logger.log(JSON.stringify(dataAll))
    return JSON.stringify(dataAll) }
          else if(parameter != undefined && subparam === undefined) {
            return dataAll[parameter] }
          else if (parameter != undefined && subparam != undefined) {
            return dataAll[parameter][subparam] }
        }
60  Economy / Trading Discussion / Re: Gunbot vs Leonardo on: July 13, 2017, 04:36:26 AM
Can you share some screenshot of your bot?Thanks
Pages: « 1 2 [3] 4 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!