Pact
GET/api/v1/pacts
Authorization
bearer_token In: header
Query Parameters
Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.
Full-text search over this list's searchable fields.
1 <= length <= 200Comma-separated sort keys, - for descending, at most 1. Keys: title, updated_at, created_at. Default: -created_at.
Rows per page, 1 to 100 (default 25).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueSet to true to include the number of matching rows in page.total.
Response Body
application/json
curl -X GET "https://example.com/api/v1/pacts"{ "pacts": [ { "claim_ttl_seconds": 0, "claimant": "string", "contributions": [ { "amount": 0, "contributor_id": "string", "joined_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "creator_fee_bps": 0, "deadline": "2019-08-24T14:15:22Z", "description": "string", "dispute": null, "dispute_window_seconds": 0, "domain": "string", "forfeit_destination": { "kind": "sink" }, "kind": "oath", "metadata": null, "outcomes": [ { "label": "string", "outcome_id": "string", "pool": 0 } ], "pact_id": "string", "pool_config": { "beneficiary_id": "string", "payout_amount": 0 }, "receipt": null, "resolution": null, "stake": { "amount": 0, "currency_id": "string", "escrow_transfer_id": "string", "escrow_wallet": "string" }, "status": "open", "title": "string", "updated_at": "2019-08-24T14:15:22Z", "verifier": { "approvers": [ "string" ], "kind": "manual", "required_approvers": 0, "rubric": "string" } } ], "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }}POST/api/v1/pacts
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/pacts" \ -H "Content-Type: application/json" \ -d '{ "currency_id": "string", "domain": "string", "title": "string" }'{ "created_at": "2019-08-24T14:15:22Z", "kind": "oath", "pact_id": "string", "stake": { "amount": 0, "currency_id": "string", "escrow_transfer_id": "string", "escrow_wallet": "string" }, "status": "open"}GET/api/v1/pacts/{pact_id}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/pacts/string"{ "claim_ttl_seconds": 0, "claimant": "string", "contributions": [ { "amount": 0, "contributor_id": "string", "joined_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "creator_fee_bps": 0, "deadline": "2019-08-24T14:15:22Z", "description": "string", "dispute": null, "dispute_window_seconds": 0, "domain": "string", "forfeit_destination": { "kind": "sink" }, "kind": "oath", "metadata": null, "outcomes": [ { "label": "string", "outcome_id": "string", "pool": 0 } ], "pact_id": "string", "pool_config": { "beneficiary_id": "string", "payout_amount": 0 }, "receipt": null, "resolution": null, "stake": { "amount": 0, "currency_id": "string", "escrow_transfer_id": "string", "escrow_wallet": "string" }, "status": "open", "title": "string", "updated_at": "2019-08-24T14:15:22Z", "verifier": { "approvers": [ "string" ], "kind": "manual", "required_approvers": 0, "rubric": "string" }}POST/api/v1/pacts/{pact_id}/claims
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/pacts/string/claims"{ "claimant": "string", "expires_at": "2019-08-24T14:15:22Z", "pact_id": "string", "status": "open"}POST/api/v1/pacts/{pact_id}/disputes
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/pacts/string/disputes" \ -H "Content-Type: application/json" \ -d '{ "statement": "string" }'{ "dispute": { "bond_amount": 0, "bond_wallet": "string", "challenger_id": "string", "dispute_id": "string", "external_ref": "string", "filed_at": "2019-08-24T14:15:22Z", "resolved_at": "2019-08-24T14:15:22Z", "statement": "string", "status": "under_review" }, "pact_id": "string", "status": "open"}POST/api/v1/pacts/{pact_id}/disputes/resolve
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/pacts/string/disputes/resolve" \ -H "Content-Type: application/json" \ -d '{ "uphold": true }'{ "dispute": null, "pact_id": "string", "receipt": null, "status": "open"}POST/api/v1/pacts/{pact_id}/join
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/pacts/string/join" \ -H "Content-Type: application/json" \ -d '{ "amount": 0 }'{ "claim_ttl_seconds": 0, "claimant": "string", "contributions": [ { "amount": 0, "contributor_id": "string", "joined_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "creator_fee_bps": 0, "deadline": "2019-08-24T14:15:22Z", "description": "string", "dispute": null, "dispute_window_seconds": 0, "domain": "string", "forfeit_destination": { "kind": "sink" }, "kind": "oath", "metadata": null, "outcomes": [ { "label": "string", "outcome_id": "string", "pool": 0 } ], "pact_id": "string", "pool_config": { "beneficiary_id": "string", "payout_amount": 0 }, "receipt": null, "resolution": null, "stake": { "amount": 0, "currency_id": "string", "escrow_transfer_id": "string", "escrow_wallet": "string" }, "status": "open", "title": "string", "updated_at": "2019-08-24T14:15:22Z", "verifier": { "approvers": [ "string" ], "kind": "manual", "required_approvers": 0, "rubric": "string" }}POST/api/v1/pacts/{pact_id}/positions
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/pacts/string/positions" \ -H "Content-Type: application/json" \ -d '{ "amount": 0, "outcome_id": "string" }'{ "implied_odds": 0.1, "position": { "amount": 0, "created_at": "2019-08-24T14:15:22Z", "holder_id": "string", "outcome_id": "string", "pact_id": "string", "payout": 0, "position_id": "string", "settled": true }, "total_pool": 0}POST/api/v1/pacts/{pact_id}/resolve
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/pacts/string/resolve" \ -H "Content-Type: application/json" \ -d '{}'{ "pact_id": "string", "receipt": null, "resolution": null, "status": "open"}POST/api/v1/pacts/{pact_id}/void
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/pacts/string/void" \ -H "Content-Type: application/json" \ -d '{}'{ "claim_ttl_seconds": 0, "claimant": "string", "contributions": [ { "amount": 0, "contributor_id": "string", "joined_at": "2019-08-24T14:15:22Z" } ], "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "creator_fee_bps": 0, "deadline": "2019-08-24T14:15:22Z", "description": "string", "dispute": null, "dispute_window_seconds": 0, "domain": "string", "forfeit_destination": { "kind": "sink" }, "kind": "oath", "metadata": null, "outcomes": [ { "label": "string", "outcome_id": "string", "pool": 0 } ], "pact_id": "string", "pool_config": { "beneficiary_id": "string", "payout_amount": 0 }, "receipt": null, "resolution": null, "stake": { "amount": 0, "currency_id": "string", "escrow_transfer_id": "string", "escrow_wallet": "string" }, "status": "open", "title": "string", "updated_at": "2019-08-24T14:15:22Z", "verifier": { "approvers": [ "string" ], "kind": "manual", "required_approvers": 0, "rubric": "string" }}GET/api/v1/positions
Authorization
bearer_token In: header
Query Parameters
Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.
Comma-separated sort keys, - for descending, at most 1. Keys: created_at. Default: -created_at.
Rows per page, 1 to 100 (default 25).
1 <= value <= 100The page.next_cursor of the previous page. Cannot be combined with page.
A 1-based page number, for jumping. Cannot be combined with cursor.
1 <= valueSet to true to include the number of matching rows in page.total.
Response Body
application/json
curl -X GET "https://example.com/api/v1/positions"{ "page": { "has_more": true, "next_cursor": "string", "page": 0, "total": 0 }, "positions": [ { "amount": 0, "created_at": "2019-08-24T14:15:22Z", "holder_id": "string", "outcome_id": "string", "pact_id": "string", "payout": 0, "position_id": "string", "settled": true } ]}