repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
Mirrored from https://github.com/ProjectOpenSea/opensea-skill
stars
latest
clone command
git clone gitlawb://did:key:z6MkqRzA...RfoM/ProjectOpenSea-...git clone gitlawb://did:key:z6MkqRzA.../ProjectOpenSea-...fef93001Release v2.14.012h ago| #1 | #!/usr/bin/env bash |
| #2 | set -euo pipefail |
| #3 | |
| #4 | if [ "$#" -lt 1 ]; then |
| #5 | echo "Usage: opensea-account-offers.sh <address> [limit] [after] [collection_slugs] [chains] [sort_by] [sort_direction]" >&2 |
| #6 | echo "Get active offers made by an account" >&2 |
| #7 | exit 1 |
| #8 | fi |
| #9 | |
| #10 | address="$1" |
| #11 | limit="${2:-20}" |
| #12 | after="${3:-}" |
| #13 | collection_slugs="${4:-}" |
| #14 | chains="${5:-}" |
| #15 | sort_by="${6:-}" |
| #16 | sort_direction="${7:-}" |
| #17 | |
| #18 | query="limit=$limit" |
| #19 | [ -n "$after" ] && query="$query&after=$after" |
| #20 | [ -n "$collection_slugs" ] && query="$query&collection_slugs=$collection_slugs" |
| #21 | [ -n "$chains" ] && query="$query&chains=$chains" |
| #22 | [ -n "$sort_by" ] && query="$query&sort_by=$sort_by" |
| #23 | [ -n "$sort_direction" ] && query="$query&sort_direction=$sort_direction" |
| #24 | |
| #25 | "$(dirname "$0")/../opensea-get.sh" "/api/v2/account/${address}/offers" "$query" |
| #26 |