{"id":21697395,"url":"https://github.com/web3space/web3exchange-api","last_synced_at":"2025-03-20T15:13:38.685Z","repository":{"id":97406340,"uuid":"152590388","full_name":"web3space/web3exchange-api","owner":"web3space","description":"API for web3 exchange","archived":false,"fork":false,"pushed_at":"2018-10-14T14:06:11.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-25T14:13:18.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"LiveScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/web3space.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-11T12:45:33.000Z","updated_at":"2018-10-14T14:06:13.000Z","dependencies_parsed_at":"2023-04-03T13:49:17.205Z","dependency_job_id":null,"html_url":"https://github.com/web3space/web3exchange-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3space%2Fweb3exchange-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3space%2Fweb3exchange-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3space%2Fweb3exchange-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/web3space%2Fweb3exchange-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/web3space","download_url":"https://codeload.github.com/web3space/web3exchange-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244637103,"owners_count":20485446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T19:25:23.176Z","updated_at":"2025-03-20T15:13:38.655Z","avatar_url":"https://github.com/web3space.png","language":"LiveScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Web3 Exchange API\n\n### Install\n\n```\nnpm i web3exchange-api\n```\n\n### How to use\n\nGenerate the private key [here](https://www.bitaddress.org/bitaddress.org-v3.3.0-SHA256-dec17c07685e1870960903d8f58090475b25af946fe95a734f88408cef4aa194.html) or another place trusted by you.\n\nGet Address \n\n```Javascript \n\nvar builder = require('web3exchange-api');\n\nvar privateKey = \"cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4\";\nvar apiUrl = \"http://ethnamed.io:8081\";\n\nvar address = builder.getAddress(privateKey);\n\n```\n\nContact to API's admin and privide him your address\nHe have to put your public address into the `config.json/recaptcha/whitelist` on the server\n\nInit the API\n\n```Javascript\n\nvar builder = require('web3exchange-api');\n\nvar privateKey = \"cPBn5A4ikZvBTQ8D7NnvHZYCAxzDZ5Z2TSGW2LkyPiLxqYaJPBW4\";\nvar apiUrl = \"http://ethnamed.io:8081\";\n\nbuilder.createApi({ apiUrl, privateKey }, (err, api)=\u003e {\n\n    api.convert({ from, to, value, address }, cb);\n    \n});\n\n\n```\n\n### Crypto To Fiat\n\n```Javascript\n\nvar request = {\n    clientid: api.createClientid(),\n    from: \"ETH\",\n    to: \"USD\",\n    value: \"1\", //ETH\n    address: \"0000 0000 0000 0000\"\n}\n\nvar cb = (err, data) {\n    //Send 1 ETH Here\n    console.log(data.address);\n}\n\napi.convert(request, cb);\n\n\n```\n\n\n### Fiat To Crypto\n\n```Javascript\n\nvar request = {\n    clientid: api.createClientid(),\n    from: \"USD\",\n    to: \"ETH\",\n    value: \"100\", //USD\n    address: \"0xbd7ac0f279dc56b61fb10faeaa7fd8da54e92408\" //Your ETH address to receive coins\n}\n\nvar cb = (err, data) {\n    console.log(data.checkout_url);\n}\n\napi.convert(request, cb);\n\n```\n\n\nYou can get an error `KYC is required` so please follow next steps\n\n```Javascript\n\nvar request = {\n    clientid: request.clientid,\n    email: \"you@email.com\",\n    clientid: \"\"\n    firstname: \"John\",\n    lastname: \"Melburn\"\n    address: \"8913 3rd Street Brooklyn, NY 11223\",\n    photo: \"data:\" // Encoded base64, please make sure that photo in correct format\n    bill: \"data:\" // Encoded base64, please make sure that bill in correct format\n}\n\nvar cb = (err, data) {\n    console.log( err === null);\n}\n\napi.kyc(request, cb);\n\n```\n\n[Here](https://www.base64-image.de/) is information how to encode the image.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3space%2Fweb3exchange-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb3space%2Fweb3exchange-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb3space%2Fweb3exchange-api/lists"}