{"id":18707619,"url":"https://github.com/descartesnetwork/sen-otc-prog","last_synced_at":"2025-07-16T04:40:48.735Z","repository":{"id":63506062,"uuid":"567542818","full_name":"DescartesNetwork/sen-otc-prog","owner":"DescartesNetwork","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-25T13:16:11.000Z","size":186,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-01T04:08:20.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DescartesNetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-18T02:24:12.000Z","updated_at":"2022-11-19T17:03:07.000Z","dependencies_parsed_at":"2024-08-19T17:34:40.245Z","dependency_job_id":null,"html_url":"https://github.com/DescartesNetwork/sen-otc-prog","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"d5312f3c94b6e7ba6fe47a8b28a9481c4cbd572b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DescartesNetwork/sen-otc-prog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DescartesNetwork%2Fsen-otc-prog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DescartesNetwork%2Fsen-otc-prog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DescartesNetwork%2Fsen-otc-prog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DescartesNetwork%2Fsen-otc-prog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DescartesNetwork","download_url":"https://codeload.github.com/DescartesNetwork/sen-otc-prog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DescartesNetwork%2Fsen-otc-prog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265482132,"owners_count":23774007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T12:19:06.058Z","updated_at":"2025-07-16T04:40:48.707Z","avatar_url":"https://github.com/DescartesNetwork.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OTC\n\n## IMPORTANT!\n\nIn this program, we will use strict conventions that\n\n- `a` is the amount of token `A` that the MAKER wants to sell.\n- `b` is the amount of token `B` that the MAKER wants to buy.\n- `x` is the amount of token `A` that a TAKER takes out of the treasury.\n- `y` is the amount of token `B` that a TAKER puts in of the treasury.\n- `maker_fee` is always about the token `B`.\n- `taker_fee` is always about the token `A`.\n\n## Installation\n\n```bash\nnpm i @sentre/otc\n```\n\nor,\n\n```bash\nyarn add @sentre/otc\n```\n\n## Usage\n\n```js\nimport Otc, { DEFAULT_OTC_PROGRAM_ID, DEFAULT_RPC_ENDPOINT } from '@sentre/otc'\nimport { Wallet, web3 } from '@project-serum/anchor'\n\nconst wallet = new Wallet(web3.Keypair.generate())\nconst otc = new Otc(wallet, DEFAULT_RPC_ENDPOINT, DEFAULT_OTC_PROGRAM_ID)\n\nconst order = await otc.getOrderData(\n  '9EKdURf9kaR8yeu9sWSiGQaeMz59zfigQe4mcfsGnLW8',\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdescartesnetwork%2Fsen-otc-prog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdescartesnetwork%2Fsen-otc-prog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdescartesnetwork%2Fsen-otc-prog/lists"}