Users can now cancel withdrawals

Previously when making a withdrawal if you made a mistake or you simply wanted to change coins you could only do so by contacting support. I have now made withdrawals available to be cancelled by users. A withdrawal can only be cancelled if it’s in the pending state. The pending state indicates the withdrawal has not been approved yet and therefore not in the process of being sent. If the withdrawal has already been approved a cancellation will no longer be possible.

Gson Blockchain.info Json reader

I wrote this to easily access the blockchain.info ticker data via Gson. The URL for the json data can be accessed here: https://blockchain.info/ticker and the api documentation can be found here: https://blockchain.info/api/exchange_rates_api

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cryptospout.tipbot.json;
 
import com.google.gson.annotations.SerializedName;
 
/**
 *
 * @author Cryptospout
 */
public class TickerData {
    //{"15m" : 478.68, "last" : 478.68, "buy" : 478.55, "sell" : 478.68,  "symbol" : "$"}
    @SerializedName("15m")
    private double lastFifthteenMinutes;
    private double last;
    private double buy;
    private double sell;
    private String symbol;
 
    public double getLastFifthteenMinutes() {
        return lastFifthteenMinutes;
    }
 
    public void setLastFifthteenMinutes(double lastFifthteenMinutes) {
        this.lastFifthteenMinutes = lastFifthteenMinutes;
    }
 
    public double getLast() {
        return last;
    }
 
    public void setLast(double last) {
        this.last = last;
    }
 
    public double getBuy() {
        return buy;
    }
 
    public void setBuy(double buy) {
        this.buy = buy;
    }
 
    public double getSell() {
        return sell;
    }
 
    public void setSell(double sell) {
        this.sell = sell;
    }
 
    public String getSymbol() {
        return symbol;
    }
 
    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }
 
 
 
}

Test class:

 
import com.cryptospout.tipbot.json.TickerData;
import com.cryptospout.tipbot.task.BitcoinPriceTask;
import static com.cryptospout.tipbot.task.BitcoinPriceTask.BLOCK_CHAIN_TICKER_API;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
 
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Cryptospout
 */
public class BlockChainTickerTest {
 
    public static void main(String[] args) {
        Gson gson = new Gson();
        try {
 
           Map<String, TickerData> data= gson.fromJson(new JsonReader(new InputStreamReader(new URL(BLOCK_CHAIN_TICKER_API).openStream())),new TypeToken<Map<String, TickerData>>() {}.getType());
                  System.out.println(data.get("USD").getLastFifthteenMinutes());
        } catch (MalformedURLException ex) {
            Logger.getLogger(BitcoinPriceTask.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(BitcoinPriceTask.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}

ScribeJava Reddit API

The following code is for the the ScribeJava OAuth library and allows access to connect to the Reddit API via oauth2

package com.cryptospout.tipbot.api;
 
import com.github.scribejava.core.builder.api.DefaultApi20;
import com.github.scribejava.core.extractors.OAuth2AccessTokenJsonExtractor;
import com.github.scribejava.core.extractors.TokenExtractor;
import com.github.scribejava.core.model.OAuth2AccessToken;
import com.github.scribejava.core.model.Verb;
 
/**
*
* @author Cryptospout
*/
public class RedditApi extends DefaultApi20 {
 
private static class InstanceHolder {
 
private static final RedditApi INSTANCE = new RedditApi();
}
 
@Override
public TokenExtractor&lt;OAuth2AccessToken&gt; getAccessTokenExtractor() {
return OAuth2AccessTokenJsonExtractor.instance();
}
 
public static RedditApi instance() {
return InstanceHolder.INSTANCE;
}
 
@Override
public Verb getAccessTokenVerb() {
return Verb.POST;
}
 
@Override
public String getAccessTokenEndpoint() {
return "https://www.reddit.com/api/v1/access_token";
}
 
@Override
protected String getAuthorizationBaseUrl() {
return "https://www.reddit.com/api/v1/authorize";
}
 
}

New Homepage Layout

I have been making some Homepage layout changes to Cryptospout over the past few weeks. Some functionality updates are also planned to be updated including: The removal of phone number requirements for registration, the ability to cancel pending withdrawals, and the ability to personalize your account. Later this week the member’s area will also be getting some layout changes to help make things easier to use.

In other news Congratulations Cryptospout members for earning over 20 Bitcoins through our offer program.  Let’s aim for another 20!

New offer provider: CPALeads

CPALeads has been added to the site for earning points here at Cryptospout. They tend to have more apps than offers so to make full use of their points wall you should be using a mobile device. You can access the CPALeads points wall by clicking on the Earn Points Tab then clicking CPALead. CPALead has two types of offfers apps and a generic offers tab to switch categories simply click  the menu button in the top right corner

cpalead

 

or scroll to the bottom of the offers and find two navigation buttons at the bottom

 

cpalead2

Daily bonus!

I still get tickets and emails daily regarding the return of the faucets. Although my answer is still “not at this time” I think I have found a way to bring the spirit of the faucets back to Cryptospout. Starting today you can get a daily bonus of 0.000035 points for completing offers each 24 hour cycle. So make sure to come everyday and complete some offers to maximize your bonus points!

Transaction ids are back

One of the downsides of switching to the Poloniex api 2 months ago was that I couldn’t easily report transaction ids for withdrawals. The reason is due to how Poloniex API initiates withdrawals it only returns a success or error message for example: {“response”:”Withdrew 2398 NXT.”} but does not return a transaction id because poloniex queues transactions. However you can use the Poloniex api to pull withdrawal and deposit history between two unix timestamps. After some playing around I was able to have my withdrawal table correlate the poloniex withdrawal history and grab the txid. One issue that may have occurred that I didn’t consider prior to running the cron to catch up the database is that if you use the same withdrawal address and withdraw the same amount the script will have given the first txid in the list repeatedly. This issue would only occur when I ran the first run of the script because I was going so far back in time for the transaction history and will not occur on future txid updates.

 

 

TLDR Transaction ids are back.