Getting a single value from fixer.io and use it on my website to multiply? - api

I have a bunch of prices listed on my website, in British Punds. I would like to pull the current currency exchange rate into my website, to convert this value to another currency. It seems that fixer.io gets the data I need, but how do I pull it into my page? I only need 1 value form it.
My page loads the prices from a database, so I guess I need to multiply the database numbers with jQuery when the page is loaded.
Thats not my current issue though. I just want to figure out how to pull a single number, and be able to use it on my page.

Good day.
If you need to get currency rates for British Punds with fixer.io, you can make get request to
GET https://api.fixer.io/latest?base=GBP
And you will get latest foreign exchange reference rates for GBP.
If you don't need all list of currencies you may use something like
GET https://api.fixer.io/latest?symbols=USD,EUR?base=GBP
And you will get exchange rates for USD and EUR with base GBP.
Hope it will help you!

Related

Bitcoin arbitrage collection formula

https://cryptorank.io/price/bitcoin/arbitrage
I am working on displaying the various currencies like Bitcoin arbitrage URL shared above.
There are number of the records with +9.53%, +7.7% against the other currencies. I tried hard to find out the formulae for this calculation but I was unable to do this.
I asked this question if anyone worked on this type of the problem before might helpful for me to get the idea on this.
Looking forward for your suggestions!
The percentages as shown on this page are calculated based on the exchange rates of the row and column (i.e. of different exchanges):
1 - (exchangeRateOfRow / exchangeRateOfColumn)
E.g. the 11.5% in the first cell of your screenshot:
1 - (19,536 / 22,069) = 0.115 = 11.5%
I don't want to make any statement about whether these are real arbitrage opportunities.

Commodity Term Structure Data from Bloomberg

I am looking for a way to download daily WTI crude oil (CL) term structure data from Bloomberg in the Excel Add-in.
My goal is to create a table that looks like this: For each futures contract, I want the lat price and the days to maturity.
Date
CL1
CL2
...
1.1.12
PX_Last
FUT_ACT_DAYS_EXP
PX_Last
FUT_ACT_DAYS_EXP
I have tried the FUT_ACT_DAYS_EXP code but for historical price series it is not available. Is there maybe a different way to receive the term structure data with days to maturity from BB?
Many thanks!
The generic contract CL1 Comdty has a historic field of FUT_CUR_GEN_TICKER. So you can pull back a timeseries of PX_LAST and FUT_CUR_GEN_TICKER.
Then you can feed these underlying contract tickers into a BDP call for LAST_TRADEABLE_DT and subtract the PX_LAST date. You can hide the intermediate columns if they are not needed.
And the final result, with the intermediate column D hidden:
NB. I'm using array functions here (note the # symbols in the formulae), rather than hard-coding ranges. It makes it more flexible if you want to change the history range. The multiple BDP calls are unnecessary but the Bloomberg addin may be caching them in any case. If performance is an issue you can use the UNIQUE() function to get a list of the underlying contract names into a lookup table.
It's been a few years since I looked at this but you are using generic tickers, whereas FUT_ACT_DAYS_EXP would most likely expect an actual contract, e.g. CLU1. There is a field that you can use to convert generic to actual as a time series, i.e. with BDH, but you would have to check that on FLDS. Once you have that you can use BDH to pull in price and days to expiry. Bear in mind that with one BDH per date this would be a very inefficient approach with regards to limits .
Alternatively ask HELP HELP and they should give you a solid answer. Unfortunately I don't access to the terminal anymore but I used to be very involved in building such analytics.

Bloomberg Security Lookup - Best way to lookup by symbol and exchange/country

What is the best way to lookup symbols based upon country or exchange? Example if I want to query for the March 2016 Ten Year Treasury Note I pass in 'TYH6 Comdty'. What if I want to designate the country or exchange in the query? Is that possible?
I'm trying to match position records from our clearing firm to calculate P&L with data from the Bloomberg API. I'm not sure if it's going to be a viable solution based upon clearing symbols and matching them to Bloomberg symbols for derivatives. I can match on Maturity(YYYYMM) but I'm not sure the product code will match up.
Request request = refDataService.CreateRequest("ReferenceDataRequest");
Element securities = request.GetElement("securities");
securities.AppendValue("TYH6 Comdty");
If I want to be able to filter the request by exchange or country, is that possible?

ebay getOrders API

I am building a .net service to getOrders from ebay. my service runs fine, however I dont know how should I handle data.
For example I am using CreateTimeTo and CreateTimeFrom Filter to return orders from past 24 hours. I save them into my database, now some orders return no Address info.
My question is, Whats the best way to hadnle/update already imported orders into my database. Say for example order imported into my system wa without shiping info, and customer completed shipping info after a week, how would I update that order in my system?
Thanks
I would definitely use modtimefrom modtimeto filter. Ih this way you can get all order that have been modiefied in last "x interval". This way you will get either new orders and modified (checkout complete - paid - shipped) and so on. My favourite filter anyway is NumberOfDays. This one acts as ModTimeFrom/ModTimeTo but is way more simple and you don't have to deal with dates.
An order without address means buyer has not completed checkout (no payment selected so no shipping address as well yet).
Once buyer completes checkout or order is mark as paid the entire address will be avaible.
You can get buyer default address shipping by using call GetSellerTransaction
I hope i understood your question and to be helpful.

hiding unnecessary fields in Access Report

At my workplace there is a "Daily Feedback" database where details are entered of any errors made by Customer Service Officers (CSOs), such as who made the mistake, when, and what service it was for. this is so we can gather data which would show areas where CSO's are repeatedly making mistakes so we can feed this back to them and train them in those areas if need be.
i currently have a report where an CSOs name is entered along with a date range and it produces the report showing the number of errors made for each service for that date range.
the code used is -
=Sum(IIf([Service]="Housing",1,0))
=Sum(IIf([Service]="Environmental Health",1,0))
etc etc for each Service.
The problem i have is that not every CSO does EVERY service and so there are usually a few results showing as "0". and i cannot be sure if thats because they dont do the service or if they are just very good at that service.
Being absolutely useless at SQL (or any other possible way of fixing this) i cannot figure out how to HIDE the entries that produce the zero value.
any help here would be greatly appreciated!
Assuming you have a table with the fields CSO, Service, FeedbackComments you could modify the report record source to
SELECT [CSO], [Service], Count([FeedbackComments])
FROM [FeedbackTable]
GROUP BY [CSO], [Service];
Then services which have no records will not appear on the report.
I don't understand exactly what you want. But I want to mention you can use the COUNT() function along with SUM(). A count >0 will reveal if 0 means '0' instances or '0' errors.