npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

krw-exchange-rate-to-json

v1.1.2

Published

Korean won exchange rate crawling program

Downloads

5

Readme

KRW Exchange rate to JSON

고시된 환율 정보 및 특정 국가 화폐에 대한 환율 정보를 쉽고 빠르게 얻을 수 있습니다.

설치

npm install --save krw-exchange-rate-to-json

사용 방법

const {getExchangeRateDataFromWebPage, convertCurrency} = require('krw-exchange-rate-to-json')

// 최종 고시된 환율 정보를 얻어올 때
getExchangeRateDataFromWebPage().then(
    r => console.log(r),
    err => console.error(err)
)

// 특정 화폐에 대한 환율 정보를 얻어올 때(현금 살때, 팔때 기준)
// 첫번째 인자로 ISO 4217에 해당하는 화폐 코드를 전달해야 정상적인 결과를 얻을 수 있습니다.
convertCurrency('USD').then(
    r => console.log(r),
    err => console.error(err)
)

WEB API

설명

다음의 경로를 통해 언제든 필요할 때 데이터를 요청할 수 있습니다.

  1. 최종 고시된 환율 정보를 다음의 URL을 통해 얻어올 수 있습니다. http://api.fureweb.com/exchangeRate/

  2. 특정 화폐에 대한 환율 정보를 다음의 URL을 통해 얻어올 수 있습니다. http://api.fureweb.com/exchangeRate/ISO4217CODE (ignore case)

사용예제

  1. 미국 달러화에 대한 원화 환율 정보를 얻어올 때 http://api.fureweb.com/exchangeRate/USD

  2. 일본 엔화에 대한 원화 환율 정보를 얻어올 때 http://api.fureweb.com/exchangeRate/JPY

ISO 4217 코드

아래 링크의 자료를 참고하세요.

https://en.wikipedia.org/wiki/ISO_4217

데이터 포맷

  • 전체 환율정보 (getExchangeRateDataFromWebPage)
{
    requestDate: "Number", // 요청일시
    date: "Number", // 고시일시
    times: "Number", // 고시회차
    data: [
        {
            countryName: "String", // 국가명
            currencyCode: "String", // ISO 4217 Code
            cash: { // 현찰
                buy: { // 살때
                    exchangeRate: "Number",
                    spread: "Number" 
                },
                sell: { // 팔때
                    exchangeRate: "Number",
                    spread: "Number" 
                }
            },
            remittance: { // 송금
                send: "Number",
                receive: "Number"
            },
            travelersCheck: { // 여행자수표
                buy: "Number"
            },
            foreignCurrencyCheck: { // 외화수표
                sell: "Number"
            },
            tradingStandardRate: "Number", // 매매 기준율
            exchangeFee: "Number", // 환가료율
            USDConversionRate: "Number" // 미화 환산율
        }
    ]
};
  • 특정 화폐 환율 정보 (convertCurrency)
{
    requestedTime: "Number", // 요청시간 Timestamp
    sell: "Number", // 현금 살때 기준
    buy: "Number", // 현금 팔때 기준
    remittance: {
        send: "Number", // 송금 보낼때
        receive: "Number" // 송금 받을때
    }
}

LICENSE

MIT @ FUREWEB