https://github.com/factomproject/fer-api
This is a program that exposes an API to generate FER json objects
https://github.com/factomproject/fer-api
Last synced: 9 months ago
JSON representation
This is a program that exposes an API to generate FER json objects
- Host: GitHub
- URL: https://github.com/factomproject/fer-api
- Owner: FactomProject
- Created: 2018-11-01T19:38:58.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2018-12-11T17:24:15.000Z (over 7 years ago)
- Last Synced: 2025-04-11T04:39:49.466Z (12 months ago)
- Language: Go
- Size: 1.69 MB
- Stars: 0
- Watchers: 18
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FEREntryCreator
This is a clone of github.com/FactomProject/FEREntryCreator changed into an API to produce entries into the Factoid Exchange Rate (FER) chain.
This is made to return the commit entry message and the reveal for that entry.
NOT the full curl commands like `github.com/FactomProject/FEREntryCreator` returns.
# Setup
---
`$ cd go/src/github.com/FactomProject`
`$ git clone git@github.com:FactomProject/fer-api.git`
`$ cd fer-api`
`$ go install`
`$ fer-api` <- runs the application
You should see:
> 2018/11/02 11:14:53 web.go serving :9999
** factomd needs to be running to change Entry rate price**
# Setting Up Factomd for LOCAL entry rate price change
---
https://factom.atlassian.net/wiki/spaces/SOF/pages/543457281/2018+test+FER+exchange+rate+system
That link has full intructions for changing exchange rate price, but for this application we only need the beginning until it syas "Install FEREntryCreator"
After running through all of this steps the factomd environment is ready to run `fer-api`
# Calling API
---
URL: `http://localhost:9999/change-price`
Body Example: `{"jsonrpc": "2.0", "id": 0, "params":{"expiration-height":"95", "activation-height":"94", "priority":"1", "new-price-per-EC":"6000"}}`
* `"expiration-height"`: recommended to be +4 of your current block height.
* `"activation-height"`: recommended to be +3 of your current block height.
* `"priority"`: 1
* `"new-price-per-EC"`: is the new entry credit price.
https://documenter.getpostman.com/view/4066798/RzZ4pM3h#intro
> This is a link for a Postman setup with documentation for this call.
> You can import to your Postman application by clicking "Run in Postman" button at hte top right of the screen.
# Notes
---
All of that can be made into Curl commands, but github.com/FactomProject/FEREntryCreator is made for Curl commands.