TAAFT
Free mode
100% free
Freemium
Free Trial
Deals

BaseMax / API-Sarrafchi

Sarrafchi: API and web service to get live currency rates in Free Market.

2 0 Language: PHP License: MIT Updated: 1y ago

README

API Sarrafchi

Sarrafchi: API and web service to get live currency rates in Free Market.

Watch demo at: https://basemax.github.io/API-Sarrafchi/example.html

Sarrafchi API

JSON Format: API, Web-Service: https://api.sarrafchi.ir/rate/

Demo in other sites

Sarrafchi API

Example

<style>.price-box{font-size: 13px;font-weight: 500;padding: 7px;margin-bottom: 5px;text-align: center;background: #dbd2fd;border-bottom: 1px solid #9d8eca;display: block;color: #48357f;border-radius: 50px;}</style>


US Dollar: – تومان
Euro: – تومان
British Pound: – تومان
Swiss Franc: – تومان
Canadian Dollar: – تومان
Australian Dollar: – تومان
Swedish Krona: – تومان
Norwegian Krone: – تومان
Russian Ruble: – تومان
<script type="text/javascript"> var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if(this.readyState == 4 && this.status == 200) { let obj = JSON.parse(this.responseText); document.querySelector("#price_usd").innerHTML=obj.currencies["US Dollar"].sell; document.querySelector("#price_euro").innerHTML=obj.currencies["Euro"].sell; document.querySelector("#price_pound").innerHTML=obj.currencies["British Pound"].sell; document.querySelector("#price_franc").innerHTML=obj.currencies["Swiss Franc"].sell; document.querySelector("#price_canad").innerHTML=obj.currencies["Canadian Dollar"].sell; document.querySelector("#price_austr").innerHTML=obj.currencies["Australian Dollar"].sell; document.querySelector("#price_krona").innerHTML=obj.currencies["Swedish Krona"].sell; document.querySelector("#price_norwkrona").innerHTML=obj.currencies["Norwegian Krone"].sell; document.querySelector("#price_ruble").innerHTML=obj.currencies["Russian Ruble"].sell; } }; xhttp.open("GET", "https://api.sarrafchi.ir/rate/", true); xhttp.send(); </script>

Crontab

$ crontab -l
*/5 * * * * php /path/to/dir/update.php

Max Base

My nickname is Max, Programming language developer, Full-stack programmer. I love computer scientists, researchers, and compilers. (Max Base)

Asrez Team

A team includes some programmer, developer, designer, researcher(s) especially Max Base.

Asrez Team

0 AIs selected
Clear selection
#
Name
Task