PHPackages                             petslane/php-bondora-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. petslane/php-bondora-api

ActiveLibrary

petslane/php-bondora-api
========================

PHP library for using Bondora API

97565[4 PRs](https://github.com/petslane/php-bondora-api/pulls)PHP

Since Apr 25Pushed 8y ago5 watchersCompare

[ Source](https://github.com/petslane/php-bondora-api)[ Packagist](https://packagist.org/packages/petslane/php-bondora-api)[ RSS](/packages/petslane-php-bondora-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-bondora-api
===============

[](#php-bondora-api)

PHP library for using Bondora API

Install
-------

[](#install)

### Composer

[](#composer)

Get php-bondora-api into your project

```
php composer.phar require petslane/php-bondora-api

```

Load composer autoloader

```
require_once 'vendor/autoload.php';
```

### Manual

[](#manual)

Download and extract library into desired folder. Load php-bondora-api autoloader

```
require_once 'path/to/library/bondoraApi.php';
```

Usage
-----

[](#usage)

Documentation:

```
use Petslane\Bondora;

$config = array(
    'auth' => array(
        'url_base' => 'https://www.bondora.com',
        'client_id' => 'client_id_123',
        'secret' => 'secret_123',
        'scope' => 'BidsEdit BidsRead Investments SmBuy SmSell',
    ),
    'api_base' => 'https://api.bondora.com',
);
$api = new Bondora\Api($config);

// Get login url
$url = $api->getAuthUrl();
// redirect user to $url. After login, user will be redirected back with get parameter 'code'

// get token from 'code' provided after user successful login. Store access_token and refresh_token
$token_object = $api->getToken($code);

// reuse access_token acquired before
$api->setToken($access_token);

// in case access_token is expired, get new access_token from refresh_token
$token_object = $api->refreshToken($refresh_token);

// get account balance
$balance = $api->accountBalance();

// get all investments
$investments = $api->accountInvestments();

// Get list of all auctions
$auctions = $api->auctions(array(
  'countries' => array('EE'),
  'interestMin' => 10,
));

// Get one auction by auction_id
$auction = $api->auction('3551302b-3f37-49f7-b97b-a4fb00f503a1');

// Bid on 2 auctions
$request = array(
  new Bondora\Definition\Bid(array(
    'AuctionId' => '3551302b-3f37-49f7-b97b-a4fb00f503a1',
    'Amount' => 25,
    'MinAmount' => 10,
  )),
  new Bondora\Definition\Bid(array(
    'AuctionId' => '88270e55-c2c3-431b-9870-a4fe00976b7d',
    'Amount' => 15,
  )),
);
$api->bidPost($request);

// Get list of all bids placed
$bids = $api->bids();

// get secondary market listing
$sm_deals = $api->secondaryMarket(array(
    'countries' => array('EE', 'FI'),
    'interestMin' => 12,
    'incomeVerificationStatus' => Petslane\Bondora\Enum\IncomeVerificationStatus::VerifiedByPhone,
));

// Gets events that have been made with current access token
$events = $api->getEventlog();

// DataExport - get daily dataset of all loan data that is not covered by the data protection laws
$dataset = $api->loandataset(array(
    'countries' => 'EE',
));

// List of all reports
$reports = $api->reports();

// Get report data by report id
$report = $api->report($reports[0]->ReportId);

// Generate report
$reportResponse = $api->createReport(ReportType::Investments);

// revoke token
$api->revokeToken();
```

Current problems
----------------

[](#current-problems)

Please, let me know!

- `report()` returns now `Report` object with empty `Result` and empty `GeneratedOn` properties if report is still generating.
    Before it returned error with error-code 404 ("Report with Id ... is not found") when report was not ready.
    If `GeneratedOn` property is set, then report is ready and all data is in `Result` property.
    This behaviour is not documented by Bondora.

Bondora API support
-------------------

[](#bondora-api-support)

Bondora API changelog -

##### Supported versions:

[](#supported-versions)

- v1.0.1.6 (08.09.2016)
- v1.0.1.5 (15.07.2016)
    - Renamed enum classes:
        - AuctionQuestionEducation -&gt; Education
        - AuctionQuestionEmploymentStatus -&gt; EmploymentStatus
        - AuctionQuestionHomeOwnershipType -&gt; HomeOwnershipType
        - AuctionIncomeVerificationStatus -&gt; IncomeVerificationStatus
        - AuctionQuestionMaritalStatus -&gt; MaritalStatus
        - AuctionQuestionOccupationArea -&gt; OccupationArea
- v1.0.1.4 (09.07.2016)
- v1.0.1.3 (25.05.2016)
- v1.0.1.2 (22.03.2016)
- v1.0.1.1 (29.01.2016)
- v1.0.1.0 (14.01.2016)
- v1.0.0.6 (07.01.2016)
- v1.0.0.5 (21.12.2015)
- v1.0.0.4 (10.12.2015)
- v1.0.0.3 (01.12.2015)
- v1.0.0.2 (25.11.2015)
- v1.0.0.1 (18.11.2015)
- v1.0 (12.11.2015)
- v1.0 Beta (03.09.2015)

Bondora API documentation
-------------------------

[](#bondora-api-documentation)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/fa4b07785d7644af86ec1edc9b7d9e6ee8d1504d342756799a0f2b3addb01ec5?d=identicon)[petslane](/maintainers/petslane)

---

Top Contributors

[![petslane](https://avatars.githubusercontent.com/u/2674369?v=4)](https://github.com/petslane "petslane (3 commits)")[![spekulatius](https://avatars.githubusercontent.com/u/8433587?v=4)](https://github.com/spekulatius "spekulatius (1 commits)")

### Embed Badge

![Health badge](/badges/petslane-php-bondora-api/health.svg)

```
[![Health](https://phpackages.com/badges/petslane-php-bondora-api/health.svg)](https://phpackages.com/packages/petslane-php-bondora-api)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
