Install
openclaw skills install peerberry-sdkUse this skill when assisting with FortressQuant's peerberry-sdk for PeerBerry investor automation, P2P lending education, and alternative-investment onboard...
openclaw skills install peerberry-sdkget_profile, get_overview, get_loans).Decimal for money and rates, never float.purchase_loan as real-money action and gate it with DRY_RUN and MAX_ORDERS.min_interest_rate, countries, loan_types).PeerberryException.Read-only starter:
from peerberry_sdk import PeerberryClient
with PeerberryClient(email="YOUR_EMAIL", password="YOUR_PASSWORD") as api:
profile = api.get_profile()
overview = api.get_overview()
loans = api.get_loans(quantity=5)
print(profile.public_id)
print(overview.data.get("availableMoney", overview.data.get("items", {}).get("availableMoney")))
print([loan.loan_id for loan in loans])
Safe invest starter:
from decimal import Decimal
from peerberry_sdk import PeerberryClient
DRY_RUN = True
MAX_ORDERS = 10
TICKET_SIZE = Decimal("10.00")
with PeerberryClient(email="YOUR_EMAIL", password="YOUR_PASSWORD") as api:
loans = api.get_loans(quantity=50, min_interest_rate=Decimal("9.5"), exclude_invested_loans=True)
for idx, loan in enumerate(loans):
if idx >= MAX_ORDERS or loan.loan_id is None:
break
if DRY_RUN:
print(f"[DRY_RUN] would invest {TICKET_SIZE} in loan {loan.loan_id}")
continue
api.purchase_loan(loan_id=loan.loan_id, amount=TICKET_SIZE)
peerberry-sdk is a Python wrapper around the PeerBerry investor API. In P2P lending, investors allocate capital across many loans (or loan fractions), receive principal and interest repayments over time, and manage risk through diversification and monitoring. PeerBerry provides marketplace access to these investor workflows, and this SDK converts them into programmable Python actions for analysis, automation, and operational control.
In scope:
Out of scope:
Classify incoming requests and respond with the matching style:
educational: user is new to P2P/PeerBerry.
references/p2p-primer.md.read_only_coding: user wants portfolio/loan analytics.
references/api-quickref.md.real_money_automation: user wants buy/invest flows.
DRY_RUN, MAX_ORDERS, funds checks, and explicit risk labels.references/api-quickref.md and references/task-recipes.md.debugging: user has errors/exceptions.
references/api-quickref.md.email, password).tfa_secret and install the otp extra.Primary entry point:
PeerberryClient: high-level client for authentication, retrieval, and purchase actions.Core model objects:
Profile, Overview, Loan, LoanPage, InvestmentPage, Transaction, AccountSummary, PurchaseOrder.Domain semantics:
loan: marketplace listing that can be invested into.investment: already-owned position in a loan.purchase order: accepted order result with order_id (not settlement confirmation).Install:
pip install peerberry-sdk
Install with 2FA support:
pip install "peerberry-sdk[otp]"
Authenticate:
from peerberry_sdk import PeerberryClient
with PeerberryClient(email="YOUR_EMAIL", password="YOUR_PASSWORD") as api:
print(api.get_profile().public_id)
Use this method map:
get_profile, get_overview, get_loyalty_tierget_loans, get_loans_page, get_loan_detailspurchase_loanget_investmentsget_transactions, get_account_summaryget_mass_investments, get_mass_transactionsget_countries, get_originatorsFor signatures, enums, and exception patterns, load references/api-quickref.md.
For copy-paste user prompts and intent routing, load references/task-recipes.md.
Always apply unless the user explicitly overrides:
DRY_RUN = True for first run.MAX_ORDERS.loan_id.available_to_invest >= ticket_size when field is present.InsufficientFunds.order_id.get_overview payload can be flat or nested under items.get_loans internally paginates with max page size 40.get_loans defaults group_guarantee=True.bytes, not typed rows.Load only what is needed:
references/p2p-primer.md
references/api-quickref.md
references/task-recipes.md
When SDK changes, update this skill in this order:
src/peerberry_sdk/client.pydocs/api/client.mdreferences/api-quickref.md first.references/task-recipes.md.SKILL.md concise and routing-focused.