Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cskonopka authored Mar 7, 2024
1 parent 97ee142 commit ea941f1
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ An API service for getting Rare Sats and Bitcoin Ordinal listing data from Magic
## What can this service do?
* Aggregate Rare Sats listings on Magic Eden and filter by *sat type*
* Aggregate Bitcoin Ordinal listings on Magic Eden and filter using a *time interval*
* Load API image on another computer and *schedule requests* with cron

* Load API image on another computer and *schedule* requests* with cron

## How does it work?

Expand All @@ -20,8 +19,9 @@ An API service for getting Rare Sats and Bitcoin Ordinal listing data from Magic
* ```docker build -t magicedenjs-api .```

2. Run Docker image
* ```docker run -p 7100:7100 -v FILE_DIRECTORY_FOR_SAVING_FILES:/app/tmp magicedenjs-api:latest
```
* ```docker run -p 7100:7100 -v FILE_DIRECTORY_FOR_SAVING_FILES:/app/tmp magicedenjs-api:latest```

---

### Load Docker Image

Expand All @@ -31,7 +31,8 @@ An API service for getting Rare Sats and Bitcoin Ordinal listing data from Magic
2. Run Docker image
* ```docker run -p 7100:7100 -v FILE_DIRECTORY_FOR_SAVING_FILES:/app/tmp magicedenjs-api:latest```


---

### Local install
1. Install dependencies
* ``` npm i ```
Expand All @@ -44,9 +45,11 @@ An API service for getting Rare Sats and Bitcoin Ordinal listing data from Magic

### processBtcListings

#### Endpoint
```
/magiceden/process-btc-listings
```

#### Parameters

* timeInterval
Expand Down Expand Up @@ -129,15 +132,17 @@ An API service for getting Rare Sats and Bitcoin Ordinal listing data from Magic
]
```

---

### processSatUrl
Search for a specific Rare Sats. Rare Sats are attributes, or "satributes," ascribed to different types of sats. Sats are the smallest unit of a Bitcoin, and satributes commemorate special moments like when a sat was mined or used in a transaction.

#### Endpoint
```
/magiceden/process-sat-url
```

### Parameters
#### Parameters

* satType
* Uncommon
Expand Down Expand Up @@ -181,13 +186,17 @@ Search for a specific Rare Sats. Rare Sats are attributes, or "satributes," ascr
}
```

---

## How to save a new Docker image?
1. Build Docker image
* ```docker build -t magicedenjs-api .```

2. Save Docker image
* ```docker save magicedenjs-api:latest | gzip > magicedenjs-api_latest.tar.gz```

---

## Cron

* Open *[crontab](https://www.geeksforgeeks.org/crontab-in-linux-with-examples/)*
Expand All @@ -205,4 +214,4 @@ crontab -e

``` text
*/10 * * * * echo "JOB at $(date)" >> ~/Desktop/job-tracker.txt
```
```

0 comments on commit ea941f1

Please sign in to comment.