Examples of OfferDataNym


Examples of org.opentransactions.otapi.OfferDataNym

            return null;
        }

        for (int j = 0; j < offerListNym.GetOfferDataNymCount(); j++) {

            OfferDataNym offerDataNym = offerListNym.GetOfferDataNym(j);
            if (offerDataNym == null || !Utility.VerifyStringVal(transactionID)) {
                continue;
            }
            if (transactionID.equals(offerDataNym.getTransaction_id())) {
                nymOfferDetails.setPrice(offerDataNym.getPrice_per_scale());
                nymOfferDetails.setMinIncrement(offerDataNym.getMinimum_increment());
                nymOfferDetails.setTotalAssetsOnOffer(offerDataNym.getTotal_assets());
                double assetCount = -1;
                try {
                    assetCount = Double.parseDouble(offerDataNym.getTotal_assets()) - Double.parseDouble(offerDataNym.getFinished_so_far());
                } catch (NumberFormatException nfe) {
                    nfe.printStackTrace();
                }

                nymOfferDetails.setAssetsStillOnOffer(assetCount == -1 ? "" : String.valueOf(assetCount));
View Full Code Here

Examples of org.opentransactions.otapi.OfferDataNym

            System.out.println("getNymOfferList - offerListNym returns null");
            return null;
        }

        for (int j = 0; j < offerListNym.GetOfferDataNymCount(); j++) {
            OfferDataNym offerDataNym = offerListNym.GetOfferDataNym(j);
            if (offerDataNym == null) {
                continue;
            }

            String[] nymDataRow = new String[3];
            //offerDataNym.getSelling()
            nymDataRow[0] = offerDataNym.getTransaction_id();
            nymDataRow[1] = offerDataNym.getSelling() == true ? "Ask" : "Bid";
            nymDataRow[2] = offerDataNym.getAsset_acct_id();

            nymOffersData.put(offerDataNym.getTransaction_id(), nymDataRow);

        }

        return nymOffersData;
    }
View Full Code Here

Examples of org.opentransactions.otapi.OfferDataNym

                        System.out.println("getMarketDetails - offerListNym returns null");
                        return null;
                    }

                    for (int j = 0; j < offerListNym.GetOfferDataNymCount(); j++) {
                        OfferDataNym offerDataNym = offerListNym.GetOfferDataNym(j);
                        if (offerDataNym == null) {
                            continue;
                        }

                        String[] nymDataRow = new String[3];
                        //offerDataNym.getSelling()
                        if(Utility.VerifyStringVal(marketData.getAsset_type_id())
                          && Utility.VerifyStringVal(marketData.getCurrency_type_id())
                          && Utility.VerifyStringVal(marketData.getScale())
                          && Utility.VerifyStringVal(offerDataNym.getAsset_type_id())
                          && Utility.VerifyStringVal(offerDataNym.getScale())
                          && Utility.VerifyStringVal(offerDataNym.getCurrency_type_id())
                          && marketData.getAsset_type_id().equals(offerDataNym.getAsset_type_id())
                          && marketData.getCurrency_type_id().equals(offerDataNym.getCurrency_type_id())
                          && marketData.getScale().equals(offerDataNym.getScale())
                                ){
                        nymDataRow[0] = offerDataNym.getTransaction_id();
                        nymDataRow[1] = offerDataNym.getSelling() == true ? "Ask" : "Bid";
                        nymDataRow[2] = offerDataNym.getAsset_acct_id();

                        nymGridData.put(offerDataNym.getTransaction_id(), nymDataRow);
                        }
                    }
                }

                marketDetails.setMarketAsk(askGridData);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.